Most simple MySQL data type
Posted: Wed Jul 16, 2008 8:07 pm
What is the most simple 0 or 1, true or false, on or off data type for mysql? What I mean by simple is space efficiency.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
TYPE STORAGE SUPPORTED BOOLS
TINYINT 1 byte 8
SMALLINT 2 bytes 16
MEDIUMINT 3 bytes 24
INT,INTEGER 4 bytes 32
BIGINT 8 bytes 64
It doesn't have any effect on what the field can actually store.JellyFish wrote:Thanks guys. I'm using TINYINT(1) at the moment, but does having a limit of 1 use less space on my database?
Oddly even though I have a limit to 1 I can place a 2 in the field, even a 20! Strange...