数据库中的的五大约束

1.主键约束(Primay Key Coustraint) 唯一性,非空性;

2.唯一约束 (Unique Counstraint)唯一性,可以空,但只能有一个;

3.默认约束 (Default Counstraint) 该数据的默认值;

4.外键约束 (Foreign Key Counstraint) 需要建立两表间的关系;

5.非空约束(Not Null Counstraint):设置非空约束,该字段不能为空。

posted @ 2018-11-21 15:14  澔如菸海  阅读(182)  评论(0编辑  收藏  举报