SQL Server Transact Basic to Expert - Add Foreign Key to existing Column

This blog shows on adding a foreign key to an existing column table

Syntax:

ALTER TABLE tablename
ADD CONSTRAINT constraintname
FOREIGN KEY (columnname)
REFERENCES [ schemaname.] referencedtablename [ ( refcolumn ) ]
Ebook Download
View all
Learn
View all