Set boolean (type = bit (1)) to Mysql Workbench

How to change the value of a logical value (type = bit (1)) in the results grid of the Mysql Workbench table?

If I set it to 1 or 0 , I get an error:

ERROR 1406: 1406: Data too long for column 'enabled' at row 1

+5
source share
2 answers

Write b'1' for true and b'0' for false.

+10
source

You can also use the keywords true false for the value where true = 1 and false = 0 .

MySQL Workbench Version: 6.3.4.0

UPDATE

Mysql server version: 5.6.27-log

enter image description here

+2
source

Source: https://habr.com/ru/post/1265476/


All Articles