We have a MSSQL database running on a SQL server 2008.
We can access this database using SSMS.
We need to create a foreign key between two tables.
WebAccess and WebCustomers
Both of these tables have data in them.
WebAccess has a one to many relationship to WebCustomers
The key for WebAccess is Key_CorporateID
The Key for WebCustomers is CorporateIDKey
The column in common is CorporateID
Can someone please create a query that I can execute on SSMS to create the foreign key between these two tables?