Display ONLY the data that has changed between 2 tables

I have a sql statement that will display the data that has changed from one table to another. How do I edit the below to output ONLY the data that has changed in t2, not both the original data from t1 as well as the updated data from t2?

SELECT col1, col2
FROM (
   SELECT t1.col1, t1.col2
   FROM t1
   UNION ALL
   SELECT t2.col1, t2.col2
   FROM t2
)  t1
GROUP BY col1, col2
HAVING COUNT(*) = 1
ORDER BY col1, col2

UPDATED: found an shorter syntax to do as required;

SELECT * FROM t2 WHERE (col1, col2) NOT IN (SELECT col1, col2 FROM t2)

Why do you have duplicate data?

I am tracking a state change of onu’s through our servers and outputting the current states onto a google map as custom markers.

Sponsor our Newsletter | Privacy Policy | Terms of Service