serious man training with stretching rubber
Databases, SQL, Stored Procedures

Adding a relationship constraint to an existing or new column in MS SQL

Spread the love

I recently needed to write some SQL to add a relationship constraint to an existing column in MS SQL. After a bit of research this is the answer I found. I have also included the SQL for adding the same constraint when creating a new table also.

 

Alter an existing table

Add a new table

Resource:
https://msdn.microsoft.com/en-GB/library/ms189049.aspx


Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *