Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

sql query per restituire le differenze tra due tabelle

(   SELECT * FROM table1
    EXCEPT
    SELECT * FROM table2)  
UNION ALL
(   SELECT * FROM table2
    EXCEPT
    SELECT * FROM table1)