Posted: 9/21/2011 9:19:37 AM
I have two database Named DB1 and DB2
In db1 i have created a table
create table db1.dbo.dept (deptid int primary key,deptname nvarchar(50) not null)
In db2 I want to create a table
create table db2.dbo.employee (employeeid int primary key,
deptid int foreign key references db1.dbo.dept(deptid))
It gives the error Cross database foreign key not supported
I want to create cross database foreign key and enforce the constraint against insert,update and delete
Posted: 9/21/2011 1:49:59 PM