Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Temporarely disabeling constraints

Temporarely disabeling constraints

From: Rune Frøysa <runefr_at_gyda.ifi.uio.no>
Date: 1997/10/14
Message-ID: <w68yb3ws61m.fsf@levding.ifi.uio.no>#1/1

I have a table where the primary key is a foreign key in another table, and I want to change the value of this key. The bnf for sql-92 indicates that the propper syntax to make oracle check constraints after performing both updates would be something like:

SET TRANSACTION READ WRITE;
SET CONSTRAINTS ALL DEFERRED;
UPDATE main SET key=201 WHERE key=4;
UPDATE refered SET key=201 WHERE key=4;

This does not work under Oracle (sqlplus/oraperl with oracle v 7.2.2.3.0). What is the propper syntax for this kind of updates?

I'm aware that this basic question should be in an faq, but I couldn't find anything useful on rtfm.mit.edu.

-- 
Rune Frøysa, IT-Seksjonen UB, UiO.    Private e-mail: runefr_at_ifi.uio.no
WWW: http://www.ifi.uio.no/%7Erunefr/ Work e-mail: rune.froysa@ub.uio.no
Received on Tue Oct 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US