SQL Join Question
Posted on 2011-03-22
Hi, I'm new to T-SQL joins and was wondering how one would build a SQL query that compares two tables and identifies changes between the two.
Example: I have listed two examples tables below. The SQL query should compare the records between each table (by ID) looking for changes in color between the two entries. The SQL query should return the the values for the CarID, CarColor, and CarNewColor for the rows with an ID of "1" only because this entry's color changed from red to orange (is different between the two tables). In the example below, the entries with ID of 2 and 3 did not change color.
Thank you in advance.