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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle8 and ON UPDATE

Re: Oracle8 and ON UPDATE

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 3 Dec 2000 14:01:42 +0100
Message-ID: <90dp77$pb4m$4@ID-62141.news.dfncis.de>

On update is *not* supported.
Also you are using the Oracle 7 sqlplus. For alternatives to on update visit
http://osi.oracle.com/~tkyte

regards,

Sybrand Bakker, Oracle DBA

"Michael J Pacione CS1998" <mpacione_at_cs.strath.ac.uk> wrote in message news:3A2A387B.6A5C1FEE_at_cs.strath.ac.uk...
> Hi
>
> I hope this is the correct newsgroup to post this to - is there a
> diference between comp.databses.oracle and comp.databases.oracle.misc? I
> must also confess to being a bit of a newbie when it comes to Oracle,
> SQL, etc.!
>
> Does anyone know if the ON UPDATE clause for specifying foreign keys is
> supported in Oracle 8.1? This is a fragment of the SQL*Plus output
> generated when I try to implement my database:
>
> SQL>
> SQL> CREATE TABLE HOMEORDER
> 2 (ORDERNUM DEC(6) NOT NULL CHECK (ORDERNUM>0),
> 3 NAME VARCHAR(30) NOT NULL CHECK (LENGTH (REPLACE (TRANSLATE
> (UPPER (NAME),'ABCDEFGHIJKLMNOPQRSTUVWXYZ ',
> 'XXXXXXXXXXXXXXXXXXXXXXXXXXX'), 'X', '')) = 0),
> 4 CARDNUM DEC(16) NOT NULL CHECK (CARDNUM>0),
> 5 COST DEC(4) NOT NULL CHECK (COST>0),
> 6 HOUSENUM VARCHAR(4) NOT NULL CHECK (HOUSENUM>0),
> 7 POSTCODE VARCHAR(7) NOT NULL,
> 8 DELDATETIME DATE NOT NULL,
> 9 STORENUM DEC(3) NOT NULL,
> 10 PRIMARY KEY (ORDERNUM),
> 11 FOREIGN KEY (STORENUM) REFERENCES STORE(STORENUM) ON UPDATE
> CASCADE ON DELETE CASCADE );
> FOREIGN KEY (STORENUM) REFERENCES STORE(STORENUM) ON UPDATE CASCADE ON
> DELETE CASCADE )
> *
> ERROR at line 11:
> ORA-00905: missing keyword
>
> I know the third line's a bit of a nightmare - it's just ensuring that
> the Name attribute only allows leters and spaces - if anyone has a
> better way, please feel free to suggest it! :)
>
> Line 11 works fine with just the ON DELETE clause on its own, but I get
> the above error when I try to use ON UPDATE as well. Swapping the order
> of the ON... clauses gives a 'missing right parenthesis' error. I'm
> beginning to suspect that the ON UPDATE clause isn't actually supported
> in the version of Oracle I'm using.
> The info is:
>
> SQL*Plus Release 3.3.3.0.0 - Production
> Oracle 8i Enterprise Edition Release 8.1.5.0.0 - Production
> With the Partitioning and Java options
> PL/SQL Relase 8.1.5.0.0 - Production
>
> There's no mention of ON UPDATE in the Oracle 8i docs at
> http://oradoc.photo.net/ora81/DOC/server.815/a67779/ch4e.htm#21922 -
> only of ON DELETE. Is ON UPDATE not supported in 8.1? If not, is there
> now an alternative way to implement its functionality?
>
> Thanks a lot,
>
> Michael Pacione
>
>
> --
> "Computer Science: A study akin to numerology and astrology, but lacking
> the precision of the former and the success of the latter."
> Stan Kelly-Bootle, The Devil's DP Dictionary, 1981.
>
>
Received on Sun Dec 03 2000 - 07:01:42 CST

Original text of this message

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