Appropriate data field type for true/false value?
Asked Answered
B

1

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!

Bunton answered 7/6, 2010 at 12:9 Comment(1)
possible duplicate of Which MySQL Datatype to use for storing boolean values?Goldeneye
C
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

Cabinet answered 7/6, 2010 at 12:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.