Home  >  Article  >  Database  >  Oracle PL/SQL之ENABLE NOVALIDATE约束

Oracle PL/SQL之ENABLE NOVALIDATE约束

WBOY
WBOYOriginal
2016-06-07 17:02:541153browse

在看Oracle约束时,看到ENABLE NOVALIDATE,意思是对自现在起及以后的数据启用约束,但是不管以前的数据怎样。不过在实验的时候却

在看Oracle约束时,看到ENABLE NOVALIDATE,意思是对自现在起及以后的数据启用约束,但是不管以前的数据怎样。

不过在实验的时候却出了一点小问题:

Google一下,发现原来在创建没有延时的UNIQUE或者PRIMARY KEY时会自动去创建一个唯一性索引。(By default a non-deferrable UNIQUE or PRIMARY KEY constraint will attempt to create a unqiue index. ?p=100:11:0::::P11_QUESTION_ID:8806498660292)

加上DEFERRABLE关键字,,问题成功解决:

linux

Statement:
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