Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Foreign Key is referencing more than 1 table

$
0
0

Hello All,

Single Foreign Key can reference  more than one table?

TableA  (Id  (PK) ,  Name )

TableB   (  Id (PK) , City )

TableC ( Id [Constraint fk1 Foreign Key References TableA (Id),Constraint fk2 Foreign Key References TableB (Id)]

In the above scenario I'm getting Error of foreign key conflict when doing INSERT operation so please guide me.

Thank you.







Viewing all articles
Browse latest Browse all 4729


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>