Oracle添加约束
2024-09-08 15:14:21
约束 -contraint
Oracle中约束类型:主键约束,唯一约束,非空约束,外键约束,check约束,下述主要是alter的方法去添加约束,也可以在建表时直接添加约束
主键约束
alter table tablename add contraint table_pk primary pk1(column);
唯一约束
alter table tablename add contraint contraint_name unique(column);
非空约束
alter table tablename modify column_name varchar2 not null;
外键约束
alter table table_name1 add contraint foreign ke(contraint_name) references table_name2(contraint_name);
Check约束
alter table table_name add constraint contraint_name check(column);
最新文章
- 关于Oracle表连接
- Windows下安装python2和python3双版本
- 服务器ssh登录提示“Permission denied, please try
- 四元数quaternion
- [转]Linq中GroupBy方法的使用总结
- python编码encode和decode
- UI1_UICollectionView
- 解决WIN8 磁盘100 活动占用100% win8硬盘一直响
- vmware虚拟机迁移系统到其它磁盘(xjl456852原创)
- java中int,float,long,double取值范围,内存泄露
- ZOJ1463:Brackets Sequence(间隙DP)
- 在Signalr的Hub中写方法实现与安卓的数据交互
- Thrift教程初级篇——thrift安装环境变量配置第一个实例
- UVa225,Golygons
- 《java.util.concurrent 包源码阅读》11 线程池系列之ThreadPoolExecutor 第一部分
- Linux 配置163yum源epel 源
- ubunut系统清理系统根目录下缓存文件夹.cache超大导致磁盘不足
- 利用 v-html 将后台数据中的换行符在页面输出
- Shell-1--概念
- 2018-2019 2 20165203 《网络对抗技术》Exp6 信息搜集与漏洞扫描
热门文章
- ASP.NET Core实现自定义中间件的三种方式
- [服务器]Windows Server 2008 64位1核1G安装SQL Server2008
- pytest(5)-自定义用例顺序(pytest-ordering)-后续学习
- (三)用go实现平衡二叉树
- 三、核心实战-服务Service-Ingress
- G1 垃圾回收详解
- Python 安装使用cx_Oracle操作Oracle数据库
- echarts柱状图快速上手笔记地址
- [转]如何将本地项目上传至Gitee仓库(详细教程)
- build opencv with qt to make debugging easier