Which MySQL data type to use for storing boolean values

前端 未结 13 1608
感情败类
感情败类 2020-11-22 04:45

Since MySQL doesn\'t seem to have any \'boolean\' data type, which data type do you \'abuse\' for storing true/false information in MySQL?

Especially in the context

13条回答
  •  故里飘歌
    2020-11-22 05:13

    BOOL and BOOLEAN are synonyms of TINYINT(1). Zero is false, anything else is true. More information here.

提交回复
热议问题