In SQL Server 2008 and given
TableA(A_ID, A_Data)
TableB(B_ID, B_Data)
ViewC(A_or_B_ID, A_or_B_Data)
is it possible to define TableZ(A_or_B_ID, Z_Data)
such that Z.A_or_B_ID
column is constrained to the values found in ViewC
? Can this be done with a foreign key against the view?
You can't reference a view in a foreign key.