PDA

View Full Version : Help On Sql



CyberGuy
09-19-2006, 02:33 PM
Hello all,
One quick question.
Is that posibble to retrive records from two separate databases at the same time? IF yes how? Could you please post a sample query.
Thanks

mwinter
09-19-2006, 08:00 PM
Database names can prefix table names, just like table names can prefix column names, using a dot (.) in each case:



database-name.table-name

The default database, selected with either the USE command, or upon connection to the database server, helps simplify access by allowing that database name to be omitted in queries.

It should be noted that trying to access, and certainly trying to join, two tables in different databases is probably unwise. A database should encapsulate an entire set of entity relationships. In some DBMS, database separation is strictly enforced (such as in PostgreSQL).

Mike

codeexploiter
09-20-2006, 02:36 PM
Though MS-Access has lots and lots of limitations as a database it offers linking of tables of different databases.

Using this feature one can use a table which is actually not a part of its database, as if it is a part of that database.