Some databases or database engines allow to query different databases from one connection.
SQLite
In SQLite database, there is an ability to temporary attach external databases and then use them in cross-database joins etc. Please see how to attach SQLite database in Database Tour.
BDE
When you work with a local database (i.e. database with Paradox, dBase, or FoxPro files) using the old BDE, you have an ability to build SELECT queries, which refer to another local database. Moreover, you can join tables from several different databases (so called heterogeneous joins). The external database may be folder reference (for local tables), ODBC DSN or a BDE alias. To refer a table from external database, prefix the table name with colon, external database name, and another colon, and enclose this construction in quotation marks, for example:
SELECT c.custno, o.orderdate
FROM ":CustDSN:customer" c, ":OrderAlias:order" o
WHERE ...
See also




