Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: TRUNCATE/DELETE/CONSTRAINTS/HELP
At 05:12 PM 1/9/96 -0500, you wrote:
>When attempting to delete/truncate all data from a schema's tables,
>I get errors due to referential constraints. I seem to remember a
>way to delete/truncate the tables in the proper order without having
>to create a scripts truncating/deleting the tables in any particular
>order.... something like a schema keyword? Does anyone know what I'm
>talking about? As it stands now, we have to disable the constraints
>before we can use the truncate.
>
>Thanks.
>
>
>|===========================================================|
>| Robert Sisk Phone: (803) 935-8136 |
>| SCT Utility Systems Email: rsisk_at_sctcorp.com |
>|===========================================================|
>
Hi
There is a cascade option in constraint itself. refer SQL language reference manual (4-122 to 4-136) on page 4-129 you will find about delete cascade. This will allow deletion of referenced key value in parent table having dependent rows in child table. In this case oracle will automatically delete dependent rows from child table.
I hope this helps.
Email: singhp_at_bactc.com
Voice: 415-827-5868
Fax: 415-266-6324
![]() |
![]() |