Corresponding data field type for true / false?

What is the most suitable (read the least consuming data) data field stores the value true / false / 1/0 in the mySQL database?

I previously used one character of a long tinyint, but I'm not sure if this is the best solution?

Thank!

+5
source share
1 answer
tinyint(1)

It is basically an alias from the BOOL data type, so this is normal.

See here

In addition, this is already described here:

What type of MySQL data is used to store boolean values

+10
source

All Articles