Link to home
Create AccountLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

What is the correct syntax to an ALTER statement in SQL Server to adjust a foreign key's update rule from no action to cascade?

How do I change Foreign Key Relationships - on Table SEUser with column name: Username?
The foreign key is called: FK_SEUserOptions_SEUser and I want to change (under Relationships) - the  INSERT AND UPDATE Specific area where the  Update Rule will change from No Action to Cascade?

I'm having difficulty in coming up with a valid syntax to change correctly.
Although I have included images of all the proper steps on how to manually change -

I also tried to create the table with the scripts but for some reason no coding was for the foreign keys...which was strange.
getthere1.png
getthere2.png
getthere3.png
SOLUTION
Avatar of Norman Maina
Norman Maina
Flag of Kenya image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Avatar of Kelvin Sparks
Kelvin Sparks
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of stephenlecomptejr

ASKER

Thank you for the quick replies.