Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2005 Referential Integrity Question

Status
Not open for further replies.

wbodger

Programmer
Apr 23, 2007
769
0
0
US
OK, if I have 3 tables: registration, reg_detail and event_pmt and registration has the primary key (registration_id) that is set as a foreign key in reg_detail and event_pmt, and I want to constrain these tables so that you can delete an item in reg_details or event_pmt and that is all that happens, but if you delete a record from registration, that action cascades down to reg_detail and event_pmt, do I just setup referential integrity with on delete cascade on registration?

Thanks for you help!
wb
 
Yup. Yeah. Yes.

On delete cascade is your friend in this situation.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top