Say I have two records from the same SQL Server table, and I want to see only the columns where the data is not the same between these two records. There are many columns, and the differences are not visually obvious.
Is there a query or keyword I can use to highlight the columns where the data is different?
Example:
| Column1 | Column2 | Column3 | Column4 | etc... |
|---|---|---|---|---|
| data1 | data30 | somedat | data | etc. |
| data1 | data29 | sonedat | data | etc. |
I would want to return:
| Column2 | Column3 | etc... |
|---|---|---|
| data30 | somedat | etc. |
| data29 | sonedat | etc. |
because Column2 and Column3 are have different values between the two records.