March 10, 2006 at 11:08 pm
In SQl, is there any other way of deleting records from two tables at a time in a single query?
ManoKarnan
March 11, 2006 at 1:59 am
Do u have any link between the two tables..
March 11, 2006 at 3:59 am
why do you want to do this ?
March 14, 2006 at 9:56 pm
I have a proper link between two tables. I want to delete a common record in both tables in a single delete statement.
March 15, 2006 at 4:48 am
If the foreign key between the tables is set to cascade delete them you can delete from the parent and SQL will cascade the deletes down to the child table. Otherwise you'll have to do the deletes from each table individually.
Why the need to do in one statement?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 16, 2006 at 2:50 am
Thanks for your replies.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply