Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ON DELETE NULL
A copy of this was sent to Doug Cowles <dcowles_at_nospambigfoot.com>
(if that email address didn't require changing)
On Thu, 09 Dec 1999 01:15:07 -0500, you wrote:
>Can anyone explain to me why Oracle has no "on delete null" delete
>rule?
>DB/2 has it. It seems to me it wouldn't be too much trouble for Oracle
>to
>put it in since they already have "on delete cascade". Does it
>contradict
>their database philosophy?
>
>- Dc.
It is in Oracle8i, release 8.1:
tkyte_at_8i> create table p ( x int primary key );
Table created.
tkyte_at_8i> create table c ( y int primary key, x int references p(x) on delete set null );
Table created.
tkyte_at_8i>
tkyte_at_8i> insert into p values ( 1 );
1 row created.
tkyte_at_8i> insert into c values ( 1, 1 );
1 row created.
tkyte_at_8i>
tkyte_at_8i> delete from p;
1 row deleted.
tkyte_at_8i> select * from c;
Y X
---------- ----------
1
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Dec 09 1999 - 10:45:01 CST
![]() |
![]() |