Thursday, March 8, 2012

Cascade deletes in SQL 2005

I have a logins table, a loginroles table (intermediate), and a roles table

When I delete a login from logins I need to delete the roles for that login from loginroles. I know I have to use cascade deletes, but I cannot find the option in sql 2005.

Any help would be appreciated.

Thank You,
Jason

It is there even in Express edition, you should see enable DRI(declarative referential integrity) at the top of Management Studio. BTW SQL Server 2005 also comes with the other two ANSI SQL definition DRI SET NULL and SET DEFAULT. Try the links below for more from Microsoft and my interaction with a user about SQL Server Express. Post again if you still need help.

http://msdn2.microsoft.com/en-us/library/ms186973.aspx

http://forums.asp.net/thread/1116493.aspx

|||

Can you just walk me through how to find it? I am looking around but do not see it, What should I click on? Table, PK, FK? Right click? Properties? Contraints? I look but I do not see it...

|||

You are looking for enable relationship dialog box at the top of Management studio try the link below for all the options. Post again if you still need help.

http://msdn2.microsoft.com/en-us/library/ms177288.aspx

No comments:

Post a Comment