UNION is for "unioning" the output of two select statements (with duplicate 
rows removed).  It does not matter if the tables are in the same database or 
even on the same planet, as long as they can be accessed on the same 
connection.  Sqlar creates nothing more than a standard sqlite database file 
with a table called sqlar that contains the data.

>sqlite
SQLite version 3.30.0 2019-09-04 07:55:38
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .ar -cf test.db appi.py
sqlite> .ar -cf test1.db bs.py
sqlite> attach 'test.db' as test;
sqlite> attach 'test1.db' as test1;
sqlite> create table sqlar as select * from test.sqlar union select * from 
test1.sqlar;
sqlite> .ar -t
appi.py
bs.py

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On Behalf
>Of Peng Yu
>Sent: Friday, 6 September, 2019 17:04
>To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
>Subject: [sqlite] Merge two sqlar files
>
>Hi,
>
>UNION is for tables in the same db file. Is there an easy command to
>combine two sqlar files? Thanks.
>
>https://www.sqlitetutorial.net/sqlite-union/
>
>--
>Regards,
>Peng
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to