꼬꼬마 개발자 노트/SQL
MySQL에서 boolean
Sueeeeee
2021. 12. 31. 15:17
반응형
From Mysql Ver. 5, data can be stored as boolean type.
The problem is when you check on mysql database,
it is not stored as true or false, but stored as 1 or 0.
In fact, it is not boolean type. It is TINYINT(1).
Therefore, when you bring the data, you should use 1 or 0.
OR
IF(<Column name> , 'true', 'false') as <Column name>
반응형