By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Check constraint 'bool_test_chk_1' is violated.
Check constraint 'bool_test_chk_1' is violated.
id | bool_val |
---|---|
1 | 0 |
2 | 0 |
3 | 1 |
4 | 1 |
5 | 1 |
6 | null |
Table | Create Table |
---|---|
bool_test | CREATE TABLE `bool_test` ( `id` int NOT NULL AUTO_INCREMENT, `bool_val` tinyint(1) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `bool_test_chk_1` CHECK ((`bool_val` in (true,false))) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |