Can't see MySQL BIT field value when using SELECT

前端 未结 6 742
悲&欢浪女
悲&欢浪女 2020-12-13 08:30

my_table contains the enabled field which is defined as: enabled BIT NOT NULL DEFAULT 0.

This table has multiple rows with

6条回答
  •  长情又很酷
    2020-12-13 09:07

    Bit values are returned as binary values. To display them in printable form, add 0 or use a conversion function such as BIN().

    https://dev.mysql.com/doc/refman/5.7/en/bit-field-literals.html

提交回复
热议问题