约束 -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);

最新文章

  1. 关于Oracle表连接
  2. Windows下安装python2和python3双版本
  3. 服务器ssh登录提示“Permission denied, please try
  4. 四元数quaternion
  5. [转]Linq中GroupBy方法的使用总结
  6. python编码encode和decode
  7. UI1_UICollectionView
  8. 解决WIN8 磁盘100 活动占用100% win8硬盘一直响
  9. vmware虚拟机迁移系统到其它磁盘(xjl456852原创)
  10. java中int,float,long,double取值范围,内存泄露
  11. ZOJ1463:Brackets Sequence(间隙DP)
  12. 在Signalr的Hub中写方法实现与安卓的数据交互
  13. Thrift教程初级篇——thrift安装环境变量配置第一个实例
  14. UVa225,Golygons
  15. 《java.util.concurrent 包源码阅读》11 线程池系列之ThreadPoolExecutor 第一部分
  16. Linux 配置163yum源epel 源
  17. ubunut系统清理系统根目录下缓存文件夹.cache超大导致磁盘不足
  18. 利用 v-html 将后台数据中的换行符在页面输出
  19. Shell-1--概念
  20. 2018-2019 2 20165203 《网络对抗技术》Exp6 信息搜集与漏洞扫描

热门文章

  1. ASP.NET Core实现自定义中间件的三种方式
  2. [服务器]Windows Server 2008 64位1核1G安装SQL Server2008
  3. pytest(5)-自定义用例顺序(pytest-ordering)-后续学习
  4. (三)用go实现平衡二叉树
  5. 三、核心实战-服务Service-Ingress
  6. G1 垃圾回收详解
  7. Python 安装使用cx_Oracle操作Oracle数据库
  8. echarts柱状图快速上手笔记地址
  9. [转]如何将本地项目上传至Gitee仓库(详细教程)
  10. build opencv with qt to make debugging easier