469,275 Members | 1,805 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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 1719
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 zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.