How to add Foreign key Constraint to existing table in SQL Server-SQL Server/TSQL Tutorial Part 68

preview_player
Показать описание
SQL Server / TSQL Tutorial Scenario:
You have already created two tables dbo.Customer and dbo.Orders. Primary Key is created on CustomerId column in dbo.Customer table.

Link to scripts used in SQL Server / TSQL Tutorial Video

Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
SQL Server / TSQL Tutorial ( Beginner to Advance)
Рекомендации по теме
Комментарии
Автор

Best video about adding a FK to an existing table I have found yet. Clean and simple.

necrostalker
Автор

Thank u so much! u'r video really help me a lot

sandoval
Автор

Thank you very much, that was helpful

JanekBaranek
Автор

but we are getting (ERROR 1215 (HY000): Cannot add foreign key constraint) this error sir what does it mean

gunthaanilkumar