Undocumented Query Plans: Equality Comparisons
- by Paul White
The diagram below shows two data sets, with differences highlighted: To find changed rows using TSQL, we might write a query like this: The logic is clear: join rows from the two sets together on the primary key column, and return rows where a change has occurred in one or more data columns. Unfortunately, this query only finds one of the…