摘要
在实际开发的项目中,一个健壮数据库中的数据一定有很好的完整性约束。在MySQL中,创建数据表和修改数据表时可以对表的各列进行一些操作,用以约束用户对表进行非法的记录插入和更新。文章将对创建表时直接加约束和修改表时添加约束以及删除约束进行研究。
In a real-world development project,the data in a robust database must have good integrity constraints.In MySQL,when you create and modify a data table,you can perform operations on its columns to constrain the user from illegally inserting and updating records on the table.The paper will study how to directly constrain when creating a table,and how to add constraints and delete constraints when modifying a table.
出处
《科技创新与应用》
2019年第2期72-73,共2页
Technology Innovation and Application
关键词
完整性
主键
外键
唯一键
非空
默认值
integrity
primary key
foreign key
unique key
non-null
default value