Home > Database > Mysql Tutorial > Oracle 约束的相关操作

Oracle 约束的相关操作

WBOY
Release: 2016-06-07 17:04:19
Original
881 people have browsed it

alter table mytable add primary key(col[,df[,..]]) alter table mytable add constraint constraint_name primary key(col) a

Linux公社

首页 → 数据库技术

背景:

阅读新闻

Oracle 约束的相关操作

[日期:2011-09-02] 来源:Linux社区  作者:myxx520 [字体:]

alter table mytable add primary key(col[,df[,..]])

alter table mytable add constraint constraint_name primary key(col)

alter table mytable disable primary key

alter table mytable constraint 原主键名 to 新

alter table t1 add constraint fk_t1_t2 foreign key (cid) references t2(cid);

alter table emp add constraint fk_a foreign (empno) references dept(deptno) on delete cascade

alter table emp rename constraint fk1 to fk2

alter table tablea disabled constraint fk_1;

--关闭数据完整性交验

alter table purchase enable novalidate constraint fk

alter table tableA drop constraint my_pk 删除约束

alter table add constraint name unique(col1,col2);

alter table mytable add constraint cons_name check(col

alter table mytable modify st default 'AC';\

alter table mytable modify(col1 not null) 

linux

  • 0
  • 浅谈 Oracle 监听器

    Oracle EBS “处理物料搬运单”出错解决方法

    相关资讯       Oracle教程 

    图片资讯      

    本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号

    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template