首页
视频
资源
登录
小可爱
什么时候才能领悟,取之越多失之越多
博主信息
排名
6
文章
6
粉丝
16
评论
8
文章类别
ASP.NET
16篇
JS
1篇
.NET
23篇
英语
4篇
redis
4篇
随笔
30篇
EF
3篇
前端
53篇
.net core
25篇
python
8篇
版本控制
1篇
java
2篇
nginx
2篇
docker
6篇
后端
5篇
更多
mysql
8篇
数据库
15篇
微服务
4篇
移动开发
7篇
架构
6篇
linux
2篇
最新文章
最新评价
{{item.articleTitle}}
{{item.blogName}}
:
{{item.content}}
关于我们
ICP备案 :
渝ICP备18016597号-1
网站信息:
2018-2024
TNBLOG.NET
技术交流:
群号656732739
联系我们:
contact@tnblog.net
欢迎加群
欢迎加群交流技术
原
mysql约束
3957
人阅读
2020/8/26 13:09
总访问:
853746
评论:
0
收藏:
0
手机
分类:
mysql
####一:添加约束: 1.添加主键约束 alter table 表名 add [constrant] [约束名] primary key(字段名); 2.添加唯一约束 alter table 表名 add [constrant] unique(字段); 3.添加默认索引 alter table 表名 add column 字段名 set default 默认值 4.添加检查约束 create table 表名( 字段名 enum('男','女) ); 5.添加外键约束 alter table 表名 add [constrant] [约束名] foreign key(字段名) references 主表名(字段名); ####二:删除约束 1.删除主键约束 alter table 表名 drop primay key; 2.删除外键约束 alter table 表名 drop foreign key 约束名;
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739
👈{{preArticle.title}}
👉{{nextArticle.title}}
评价
{{titleitem}}
{{titleitem}}
{{item.content}}
{{titleitem}}
{{titleitem}}
{{item.content}}