0xbe5077ed
0xbe5077ed

Reputation: 4765

What is Oracle's default FK behaviour ON DELETE?

If I simply stipulate a constraint of the form:

ALTER TABLE childtbl
    ADD (CONSTRAINT myfk
         FOREIGN KEY(mycol)
         REFERENCES parenttbl(mycol))

in an Oracle database, what is the default behaviour if I delete a row in parenttbl?

Upvotes: 0

Views: 2822

Answers (1)

Explosion Pills
Explosion Pills

Reputation: 191779

ON DELETE NO ACTION

Disallows the update or deletion of referenced data. This differs from RESTRICT in that it is checked at the end of the statement, or at the end of the transaction if the constraint is deferred. (Oracle Database uses No Action as its default action.)

Upvotes: 6

Related Questions