摘要:
学生表:student drop table student; CREATE TABLE student ( xid int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '学号', xname varchar(64) COLLATE utf8mb4_bi 阅读全文
posted @ 2019-12-18 17:31
杨港澳
阅读(56)
评论(0)
推荐(0)
摘要:
1.约束 1.PrimaryKey(PK)主键 特点:唯一 + 非空,一张表中只能有一个主键约束,一般是一个数字列,最好是无意义的。 2.NOT NULL 非空 特点:不能为空,建议在MySQL中,业务关键列,尤其是索引列,设置为非空。 3.UNIQUE 唯一约束 特点:不能有重复值,可以有多个,一 阅读全文
posted @ 2019-12-18 15:20
杨港澳
阅读(229)
评论(1)
推荐(0)
浙公网安备 33010602011771号