- 博客(1)
- 收藏
- 关注
原创 MySQL学习
1、概念:约束是作用于表中字段的规则,用于限制存储在表中的数据2、目的:保证数据库中数据的正确、有效性、完整性3、分类:注:约束是作用于表中字段上的,可以在建表/修改表的时候添加约束-- 约束id int primary key auto_increment comment '编号',name varchar(10) not null unique comment '姓名',age int check ( age between 0 and 120) comment '年龄',
2025-05-29 20:54:21
768
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅