杨__羊羊
供参考:mysql> create table sf (x boolean);
Query OK, 0 rows affected (0.04 sec)mysql> describe sf;
+-------+------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+| x | tinyint(1) | YES | | NULL | |
+-------+------------+------+-----+---------+-------+1 row in set (0.00 sec)
mysql> insert into sf values ("true"), ("1"), ("false"), ("0"), (TRUE), (FALSE);
Query OK, 6 rows affected, 2 warnings (0.00 sec)
Records: 6 Duplicates: 0 Warnings: 0mysql> select * from sf;
+------+| x |
+------+| 0 |
| 1 |
| 0 |
| 0 |
| 1 |
| 0 |
+------+6 rows in set (0.00 sec)