I want write a delete trigger in sql actually i have two tables "products" and "productdetail" and using the primary key of products as a foreign key in productdetail. product detail can contain multiple records against single product object.
now i want to do like that if i deleted one records "says having primary key 1 " in product table then all other records which have foreign key "1" in productdetail table automatically deleted
I never use trigger before this. that's means unfamiliar with its syntax i searched about it and go through to different articles but unable to understand. please give me its complete solutions i.e. its complete syntax