MySQL-操做命令(2)-字段(属性)约束

一、非空约束 要求插入记录的时候,该字段不得为NULL。 写法:在字段后面写上not null。spa create table T2(id int not null,name varchar(10) not null); blog 二、惟一性约束table 多条记录的某个字段不得重复。数据类型 约束id字段不得重复  create table T3(id int,name varchar(10)
相关文章
相关标签/搜索