5

What's the most appropriate (read least data consuming) data field to store a true/false/1/0 value in a mySQL database?

I have previously used a one character long tinyint, but I am not sure if it's the best solution?

Thanks!

Industrial
  • 41,400
  • 69
  • 194
  • 289
  • possible duplicate of [Which MySQL Datatype to use for storing boolean values?](http://stackoverflow.com/questions/289727/which-mysql-datatype-to-use-for-storing-boolean-values) – plocks May 11 '15 at 11:46

1 Answers1

13
tinyint(1)

Is basically aliased from the BOOL data type so it is fine.

See here

In addition, this has already been covered here:

Which MySQL data type to use for storing boolean values

Community
  • 1
  • 1
Bella
  • 3,209
  • 23
  • 26