View previous topic :: View next topic |
Author |
Message |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Tue Aug 01, 2006 10:06 pm Post subject: Delete from Multiple tables using a single SQL |
|
|
Hi,
I need to know if it possible to delete rows from multiple tables using a single sql? If so can some one post a sample query?
- Martin |
|
Back to top |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Wed Aug 02, 2006 1:44 am Post subject: |
|
|
Hello Martin,
no, a DELETE can be directed only to one table.
An exception is the definition of referential integrity rules with a cascading delete for the child table rows. But the use of that is limited to primary and secondary key connections between tables.
Why couldn't you use more than one SQL statement?
regards
Christian |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Wed Aug 02, 2006 1:55 am Post subject: |
|
|
Martin,
As CZerfas mentioned Delete applies to only one table only that is rows are deleted from one table.If u code
Code: |
DELETE FROM TABLEA TABLEB;
|
Delete will be applicable to only TABLEA only not to TABLEB. _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
|
|