I was designing a database for a site where I need to use a boolean
datetype to store only 2 states, true
or false
. I am using MySQL
.
While designing the database using phpMyAdmin
, I found that I have both the BOOLEAN
datatype and the TINYINT
datatype. I went through different articles, some said TINYINT
is the same as BOOLEAN
, no difference. Some say BOOLEAN
is converted into TINYINT
in MySQL
.
MY question is, if they both are same why do there exist two? There should be only one of them.
Here is the reference to the article(s) I read: