Tinyint vs Bit?

前端 未结 16 2117
暖寄归人
暖寄归人 2020-12-13 05:13

I don\'t want to touch-off a religious war here, but there seem to be two schools of thoughts in how to represent boolean values in a database. Some say bit is

16条回答
  •  没有蜡笔的小新
    2020-12-13 06:12

    A previous StackOverflow post: What is the difference between BIT and TINYINT in MySQL?

    When adding a new "BOOL" column, MySQL actually uses TINYINT.

    I'd just stick with BOOL (aka TINYINT) and move on with life.

提交回复
热议问题