MSSQL - foreign key relation between schemas
I have problem with foreign key relation in linqpad when its between 2 different schema in same database.
Lets say i have these 2 table: "dbo.Customer" and "cash.CashRegister"
cash.CashRegister have FK_CustomerID with a foreign key relation.
When i query CashRegister the Foreign Key relation are not shown? - how come?
It works fine if they are in same schema? - How can i add the relation?
Lets say i have these 2 table: "dbo.Customer" and "cash.CashRegister"
cash.CashRegister have FK_CustomerID with a foreign key relation.
When i query CashRegister the Foreign Key relation are not shown? - how come?
It works fine if they are in same schema? - How can i add the relation?
Comments
If you have 2 tables with the same name, in 2 different schema then the last created table wont have references.
With this you can see: