二十一、唯一約束

唯一性約束(unique),它可以使某個字段的值不能重複。 如:email不能重複 以上插入了重複的email,所以出現了「違反唯一約束錯誤」,所以unique起作用了 同樣可以爲多個字段做約束 drop table if exists t_student; create table t_student( student_id int(10), student_name varchar(20) n
相關文章
相關標籤/搜索