|
-
Nov 8th, 2006, 07:31 AM
#1
Thread Starter
Lively Member
deleting a single record from multiple tables
Hi All
i have a common field say email in 5 tables.
i want to delete a single record which should be deleted from all the table from which the email is related.
can anybody suggest me for the same.
Thanks
-
Nov 8th, 2006, 08:58 AM
#2
Re: deleting a single record from multiple tables
You should run 5 separate Delete statements, all within a transaction (so either they will all be deleted, or none of them will be).
Exactly how you do this depends on a few factors, such as what database system you are using, and where you want to run this from.
-
Nov 9th, 2006, 12:13 AM
#3
Thread Starter
Lively Member
Re: deleting a single record from multiple tables
I m using sql server2000 as an backend. and ASP front end.
I want to make a function and want to call it in asp page.
in this function i need to write delete command .
 Originally Posted by si_the_geek
You should run 5 separate Delete statements, all within a transaction (so either they will all be deleted, or none of them will be).
Exactly how you do this depends on a few factors, such as what database system you are using, and where you want to run this from.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|