MySQL的约束和索引

1、约束: 1.非空约束 not null; 2.惟一约束 unique(); uk unique约束的字段,要求必须是惟一的,但null除外。 3.主键约束 primary key (); pk 主键约束=not null+unique 4.外键约束:foreign key() references (参考),fk constraint fk_dept_id foreign key (dept_
相关文章
相关标签/搜索