SQLite Forum

How to create a table as the union of two tables?
How about:

create table tempunion as select * from tab1;
insert into tempunion select * from tab2 except select * from tab1;

If there were no duplicates (that is, the operation is UNION ALL) then you can omit the `except select * from tab1`.