CREATE TABLE table1 ( id INTEGER PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE table2 ( id INTEGER PRIMARY KEY, name TEXT NOT NULL ); -- insert some values INSERT INTO table1 VALUES (1, 'Abhi'); INSERT INTO table1 VALUES (2, 'Adam'); INSERT INTO table2 VALUES (1, 'Abhi'); INSERT INTO table2 VALUES (3, 'Chester'); -- union operator selects all tuples from t1 and t2. It also shows duplicate tuples -- select * from table1 union select * from table2; -- intersect operator choose tuples which are common in both tables -- SELECT * FROM table1 intersect SELECT * FROM table2; -- except(set difference) select those tuples which are only in table1 not in table2 -- select * from table1 except select * from table2;