Mysql: How to query a column whose type is bit?

后端 未结 6 1757
离开以前
离开以前 2020-12-08 14:31

Hi I am using hibernate and Mysql. I have a class with a boolean attribute called \'active\'.

The generated database table has the BIT data type. So far so good. I w

6条回答
  •  离开以前
    2020-12-08 14:47

    Actually MySQL has built-in bit literals:

    select*from table where active = 0b1
    

提交回复
热议问题