SQL command to show if table is set to cascade on delete?

Use sp_fkeys to find it msdn.microsoft.com/en-us/library/ms17509... Look at the resultset's "DELETE_RULE" column 0=CASCADE 1=NO ACTION An example: USE MyDB; GO EXEC sp_fkeys @pktable_name = N'MyTable',@pktable_owner = N'MyUserName.

Use sp_fkeys to find it. msdn.microsoft.com/en-us/library/ms17509... Look at the resultset's "DELETE_RULE" column. 0=CASCADE 1=NO ACTION An example: USE MyDB; GO EXEC sp_fkeys @pktable_name = N'MyTable',@pktable_owner = N'MyUserName.

This worked, but without the N'MyUserName' bit. Thanks! Results are bleak, cascade on delete is on.

Also, there's no USE on Azure, afaik – Gleno Sep 1 at 20:01 @Gleno I don't know what your permissions on the DB are, but you can remove cascade delete (not recommended unless you REALLY know the DB schema and that it won't screw it up) – Don Rhummy Sep 1 at 20:24 Oh, I belive it will screw it up. I'm going to clean it up manually. After finding out that there are only 2 dependencies, using your snippet, I can now proceed cautiously.

:) – Gleno Sep 1 at 20:34.

I need to delete some SQL Azure database entries, and I'm not sure if the cascade on delete is specified or not. If I by accident delete something important, I'm in a world of hurt. So, is there a command to check for cascade deletion?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions