my.ini
--------------------
[client]no-beepport=3306[mysql]default-character-set=utf8----------------------------------
table article;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| cont | varchar(200) | YES | | NULL | |
| pid | int(11) | YES | | NULL | |
| ifleaf | int(11) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
table art;
+-------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| name | varchar(100) | YES | | NULL | |
| info | varchar(200) | YES | | NULL | |
+-------+--------------+------+-----+---------+----------------+
info 外键是 article(cont)
----------------------------------------------------------------------
insert into art(null,'李四','蚂蚁大战大象');ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'null,
'????','???洗?战????')' at line 1
--------------------
[client]no-beepport=3306[mysql]default-character-set=utf8----------------------------------
table article;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| cont | varchar(200) | YES | | NULL | |
| pid | int(11) | YES | | NULL | |
| ifleaf | int(11) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
table art;
+-------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| name | varchar(100) | YES | | NULL | |
| info | varchar(200) | YES | | NULL | |
+-------+--------------+------+-----+---------+----------------+
info 外键是 article(cont)
----------------------------------------------------------------------
insert into art(null,'李四','蚂蚁大战大象');ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'null,
'????','???洗?战????')' at line 1
insert ...