请教大家
mysql> alter table holiday-> modify customerid int not null;//约束为not null
Query OK, 2 rows affected (0.06 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> insert into holiday(bookingid,destination) values(3,'guangzhou');//为什么这里还能输入为NULL;请高手帮助。。。。。谢谢`~`
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select *from holiday;
+------------+-----------+-------------+
| customerid | bookingid | destination |
+------------+-----------+-------------+
| 1 | 1 | beijing |
| 0 | 1 | shanghai |
| 0 | 3 | guangzhou |
+------------+-----------+-------------+
3 rows in set (0.00 sec)
mysql>