- 浏览: 27395 次
- 性别:
- 来自: 北京
最新评论
1.Constraints
type: Not null ,PK,FK,Check,Unique
SQL> create table mm(
2 id number constraint con_pk primary key,
3 name char(10) not null,
4 uniqueid number unique,
5 sal number check(sal>100));
alter table mm modify name not null;
alter table mm add primary key(id);
alter table mm add unique(name);
alter table mm add check(sal>1000);
alter table mm add foreign key(id) references tt(id);
alter table mm add constraint pk_cons primary key(id);
alter table mm drop primary key cascade;
alter table mm drop unique(name) cascade
alter table mm drop constraint pk_cons;
Constraint States:
■ ENABLE VALIDATE is the same as ENABLE. The constraint is checked and is
guaranteed to hold for all rows.
■ ENABLE NOVALIDATE means that the constraint is checked, but it does not have to
be true for all rows. This allows existing rows to violate the constraint, while
ensuring that all new or modified rows are valid.
In an ALTER TABLE statement, ENABLE NOVALIDATE resumes constraint checking
on disabled constraints without first validating all data in the table.
■ DISABLE NOVALIDATE is the same as DISABLE. The constraint is not checked and
is not necessarily true.
■ DISABLE VALIDATE disables the constraint, drops the index on the constraint,
and disallows any modification of the constrained columns. When any constraint is moved from the NOVALIDATE state to the VALIDATE state, all data must be checked. (This can be very slow.) However, moving from VALIDATE to NOVALIDATE simply forgets that the data was ever checked.Moving a single constraint from the ENABLE NOVALIDATE state to the ENABLE VALIDATE state does not block reads, writes, or other DDL statements. It can be done in parallel.
alter table mm enable validate constraint pk_con;
alter table mm disable novalidate primary key;
Constraint Check:
deferred: after commit,check;
nodeferred: immdeite checck;
set constraints pk_emp deferred/immediate
alter session set constraints=deferred/immediate
发表评论
-
from string get number data using pl/sql or sql
2012-02-16 17:32 892declare @aa varchar(80),--- ... -
SQL
2012-02-15 18:01 7341.select sal salary from emp; ... -
modify ip
2012-02-10 17:45 7991.netconfig 2./etc/sysconfig/n ... -
MULTI dbwr or io slaves
2012-02-10 15:21 883thanks dukope of itpub. ... -
FAQS
2012-02-09 15:59 7581.How can I get the largest amo ... -
HOW TO STUDY ORACLE FROM Yong Huang
2012-01-18 14:48 804Assuming you want to study orac ... -
RMAN
2012-01-14 17:07 7081.components of the rman ... -
INSTANCE and CRASH RECOVERY
2012-01-12 10:12 7541.type of checkpoint full c ... -
STARTUP PFILE=
2011-12-31 14:11 12281.vi initdbs.ora spfile=&quo ... -
MANAGE TABLE
2011-12-26 16:50 5751.heap table IOT PARTI ... -
MONITOR redo size
2011-12-21 17:48 6501.set autot on stat 2.unsin ... -
What do rollback and commit
2011-12-21 11:21 746When we COMMIT, all that is lef ... -
What is the schema ?
2011-12-20 15:18 592A schema is a collection of dat ... -
MANAGE UNDOTABS
2011-12-19 17:15 6811.manual undo_management=ma ... -
DBA SQL
2011-12-19 15:21 4401.select a.name,b.status from v ... -
SEGMENT EXTENTS ORACLEBLOCK
2011-12-15 16:11 8001.SEGMENT: allocated fo ... -
MANAGE TABLESPACE AND DATAFILES
2011-12-13 15:28 5801. tablespace,segment,extent,bl ... -
ORACLE NET
2011-12-12 09:49 6881.net_service_name: servive ... -
SQLPLUS TIPS
2011-12-09 17:51 9121.SQLPLUS : a tool that execute ... -
ORACLE ENVIRONMENT VARIABLES
2011-12-09 17:15 660ORACLE_HOME ORACLE_SID : or ...
相关推荐
Earthdata Download was designed to be a bulk download application for Earthdata Search, but can be reused by other applications with a bulk download need. In order to use your application with Earth...
openGauss Tools (Data Studio 3.0.0) Data Studio 用户手册.pdf openGauss 是一个开源的关系数据库管理系统,Data Studio 是 openGauss 的一款图形化管理工具。下面是根据提供的文件信息生成的相关知识点: ...
"Data Analytics with Hadoop: An Introduction for Data Scientists" ISBN: 1491913703 | 2016 | PDF | 288 pages | 7 MB Ready to use statistical and machine-learning techniques across large data sets? ...
Many big data-driven companies today are moving to protect certain types of data against intrusion, leaks, or unauthorized eyes. But how do you lock down data while granting access to people who need ...
Beginning Data Science in R: Data Analysis, Visualization, and Modelling for the Data Scientist by Thomas Mailund English | 5 Apr. 2017 | ISBN: 1484226704 | 352 Pages | PDF | 6.46 MB Discover best ...
Data Vault数据库建模方法是一种专为应对企业数据仓库(EDW)项目中复杂的数据集成、数据历史记录和灵活性问题而设计的建模技术。Data Vault方法强调数据的整合、非易失性、时间变体和业务键驱动的特点。Data Vault...
"Elements.data"和"gshop.data"是两种特定类型的数据文件,它们可能被用于各种应用程序或游戏,存储用户数据、配置信息或者游戏进度等。在这个场景中,"Kuqoi Elements x"是一款专为编辑这些文件而设计的工具,由...
1. **下载并安装finalData**:首先需要从官方网站或其他可信渠道下载finalData安装包,并按照提示完成安装过程。 2. **获取注册码**:通常情况下,用户购买finalData软件后会收到一封包含注册码的邮件。如果是在其他...
"利用getdata获取图形数据"这一主题涉及到一个名为getdata的软件工具,它专门用于从各种图形文件中提取数据点,使用户能够对这些数据进行进一步处理或分析。下面将详细介绍getdata软件及其使用方法。 getdata是一款...
Spring Data Commons 和 Spring Data JPA 是 Spring 框架中的两个关键模块,它们在 Java 应用开发中扮演着重要角色,特别是在数据访问层。这两个模块是基于 Java 的数据访问接口(JPA)来简化数据库操作,使得开发者...
SAP DataServices 技术文档 SAP DataServices 是一款强大的数据integration 平台,旨在帮助企业集成、转换和提供高质量的数据。以下是基于 DataServices 操作手册的知识点总结: 一、DataServices 简介 Data...
【GetData安装软件及使用教程】 GetData是一款强大的图形数据提取工具,尤其在科研和工程领域中广泛应用。当你遇到只有二维曲线图而缺乏具体点数据的情况时,GetData可以帮助你从图像中恢复或提取这些丢失的数据点...
Data Science and Big Data Analytics is about harnessing the power of data for new insights. The book covers the breadth of activities and methods and tools that Data Scientists use. The content ...
二维码datamatrix编码工具SDK包是一款专为开发者设计的软件开发工具包,它主要功能是生成QR Code码和Data Matrix码。在当前信息化社会中,二维码作为一种高效的信息载体,广泛应用于各种场景,如产品追溯、电子票务...
SAP Data Services如何链接MYSQL SAP Data Services 是一种功能强大的数据集成工具,它允许用户从各种数据源中提取、转换和加载数据。为了连接 MYSQL 数据库,需要按照以下步骤进行操作。 首先,需要打开 SAP ...
Title: Clean Data Author: Megan Squire Length: 267 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2015-05-29 ISBN-10: 1785284010 ISBN-13: 9781785284014 Save time by ...
STM32文档资料 STM32F103VC_DATASHEET_CNSTM32文档资料 STM32F103VC_DATASHEET_CNSTM32文档资料 STM32F103VC_DATASHEET_CNSTM32文档资料 STM32F103VC_DATASHEET_CNSTM32文档资料 STM32F103VC_DATASHEET_CNSTM32文档...
AppData文件夹是Windows操作系统中的一个重要组成部分,它存储着用户特定的应用程序数据、配置信息以及临时文件。这个文件夹的内容通常对用户不透明,但随着时间的推移,它可能会占用大量的磁盘空间,尤其是当你频繁...