title: Can I have a foreign key referencing a column in a view in SQL Server?
body: <p>In SQL Server 2008 and given</p>
  
  <pre><code>TableA(A_ID, A_Data)
  TableB(B_ID, B_Data)
  ViewC(A_or_B_ID, A_or_B_Data)
  </code></pre>
  
  <p>is it possible to define <code>TableZ(A_or_B_ID, Z_Data)</code> such that <code>Z.A_or_B_ID</code> column is constrained to the values found in <code>ViewC</code>?  Can this be done with a foreign key against the view?</p>