Home » SQL & PL/SQL » SQL & PL/SQL » delete multiple tables (oracle 11g)
delete multiple tables [message #318967] Thu, 08 May 2008 09:44 Go to next message
Messages: 1
Registered: May 2008
Location: The Netherlands
Junior Member
I want to delete rows from multiple tables.

5 tables are involved:

bio_bedr (clus_id)
bio_bron (bedr_id, bio_id)
bio_clus (clus_id)
bio_loc (clus_id, bio_id)
bio_ubi (bedr_id)

I began with the following statement:

delete from gls_bio_clus, gls_bio_bedr, gls_bio_loc
where clus_id in ('C0546017239','C0546017247','C0546017440','C0546017486',
'C0546019413', 'C0546019428','C0546019633','C0546019485','C0546019642',

However this statement doesn't work. As I now know is it not possible to delete multiple tables with a single delete statement.

Please help, i'm fairly new on this so please reply in plain and simple english!
Re: delete multiple tables [message #318971 is a reply to message #318967] Thu, 08 May 2008 09:56 Go to previous messageGo to next message
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
split the statements something like this.

delete from <table_a> where <condition>;
delete from <table_b> where <condition>;
delete from <table_c> where <condition>;


Re: delete multiple tables [message #319017 is a reply to message #318967] Thu, 08 May 2008 13:41 Go to previous message
Kevin Meade
Messages: 2102
Registered: December 1999
Location: Connecticut USA
Senior Member
If you are going to be working with SQL then you might also want to look at something like this:

SQL for Dummies 3rd Edition (Paperback)

Notice in particular:

17 used & new from $0.25

3$ for shipping...

and for the record I am not suggesting you are a Dummy, only that this is a good book for begginers.

Previous Topic: SQL PLUS query result in Horizantal way
Next Topic: DML Statement in Function
Goto Forum:

Current Time: Fri Aug 18 15:22:59 CDT 2017

Total time taken to generate the page: 0.31693 seconds