Skip to content
 

Add Foreign Key

To Add a foreign key to a column in an existing table, use ALTER TABLE ADD CONSTRAINT

ALTER TABLE dbo.President_Lookup
ADD CONSTRAINT fk_PresidentID
FOREIGN KEY (PresidentID)
REFERENCES dbo.Presidents (PresidentID)

Related Posts:

Ask a question or post a comment