MysqL> describe Quiz;
+--------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+----------------+
| quiz_id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(25) | YES | | NULL | |
| category | varchar(20) | YES | | NULL | |
| is_published | tinyint(1) | YES | | 0 | |
| open_count | int(11) | YES | | 0 | |
| finish_count | int(11) | YES | | 0 | |
+--------------+-------------+------+-----+---------+----------------+
在所有6个表中,在编写CREATE TABLE时…我没有对每个属性强制执行NOT NULL(如上所示),但它们应该是NOT NULL.
最佳答案