If you are using oracle you can use CASCADE DELETE. but you need to give the cascade option while creating the table, then you can delete the records directly in the table which is at the higher level.
if the database is other than oracle there might be a similar option as CASCADE. you can just google it to check.
Main Topics
Browse All Topics





by: suprapto45Posted on 2007-03-06 at 02:25:19ID: 18660511
>>"This can be fixed doing “DELETE FROM <table>” in a correct order. But I need to figure out a way to “find” the correct order."
As far as I know, program won't be able to check. The constraint(s) is/are created by you so only you know the best which tables should be deleted first.
Hopefully other experts may have a solution for you.
David