» Data Integrity
» Defensive progr...
» Transact SQL (RSS)
Sorry, but there are no more tags available to filter with.
In SQL 2008 R2, MERGE does not implement foreign keys properly. I will show both false negatives (valid rows are rejected) and false positives - orphan rows that are allowed to save.
The following tables implement a very common type/subtype pattern:
CREATE TABLE dbo.Vehicles( ID INT NOT ...