471,595 Members | 1,040 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Deleting record in table B on deleting record in table A using Trigger

I want to delete record in table B when i delete record in Table A both table have a common column. I want to do it using trigger .Can any body give some idea.
Table details are.

Table A:
Channel_ID, Name

Table B
User_Id,Channel_ID, Description
Aug 31 '06 #1
1 1786
ramasp
19
without using trigger
-------------------------------
1. You can choose ondelete cascade option in design mode of the table.
whenever u delete a record from table a the corresponding record from the table b will be deleted

using trigger
-------------------
create a for delete trigger on table a.

delete from b where channel id..........
Sep 4 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by XmlAdoNewbie | last post: by
20 posts views Thread by Bryan | last post: by
46 posts views Thread by DP | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.