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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…