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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL: DELETE and DROP TABLE with cascading ?

Re: SQL: DELETE and DROP TABLE with cascading ?

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Mon, 26 Feb 2007 19:47:04 +0100
Message-ID: <erv9t2$o4g$1@news1.zwoll1.ov.home.nl>


Claudia d'Amato schreef:
> As far as I found out DELETE and DROP TABLE are NOT possible with some kind of
> additional cascading instruction.
>
> DELETE CASCADE
> FROM mytable
> WHERE ....
>
> is not possible.
> Same with:
>
> DROP TABLE mytable CASCADE
>
> The only way I found so far is that I have to specify a clause
> "ON DELETE CASCADE" at the time when the table(s) were created.
>
> Is this really true?
>
> Is there no work around to pass an explicitly "get rid aff the whole table structure/records"
> at the time of deletion regardless of wether an ON DELETE CASCADE is specified before or not ?
>
> Claudia
>
>

It's drop table .... cascade constraints. That should take care of your table.
And oracle protects the relational model by not letting do this, unless the ON DELETE CASCADE is used, as you found out. But that is DML usage, not DDL (drop table...)

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Mon Feb 26 2007 - 12:47:04 CST

Original text of this message

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