List:General Discussion« Previous MessageNext Message »
From:Nils J√ľnemann Date:January 25 2007 11:01am
Subject:Re: Query Two Databases
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil Tompkins schrieb:
> Not sure if this is possible or not.  But I've two identical tables in
> two different databases.  Is it possible to retrieve data from the
> different tables in one query ?

(SELECT * FROM db1.table) UNION (SELECT * FROM db2.table)

If db2 on a other mysql server, it is possible to use the
federated storage engine of MySQL.

- --
Nils Jünemann
Database and System Administration

studiVZ | Saarbrueckerstr. 38 | 10405 Berlin | phone +49-(0)30-405042715
www.studiVZ.net  |  fax +49-(0)30-28093887   |  cell  +49-(0)175-9331740
www.estudiLN.es  |  www.studentIX.pl  | www.studiQG.fr |  www.studiLN.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuI4cYT5ehyp2X5ERAh/AAKCEDPXhlegrCu08jG0K3Eh/ZxIfgwCeIbZz
hJRxd5b07AxIlFP8/RBKQx0=
=G/4h
-----END PGP SIGNATURE-----
Thread
Query Two DatabasesNeil Tompkins25 Jan
  • Re: Query Two DatabasesMartijn Tonies25 Jan
    • Re: Query Two DatabasesNeil Tompkins25 Jan
      • Re: Query Two DatabasesDuncan Hill25 Jan
      • Re: Query Two DatabasesMartijn Tonies25 Jan
  • Re: Query Two DatabasesNils J√ľnemann25 Jan
    • Re: Query Two DatabasesNeil Tompkins13 Feb
Re: Query Two DatabasesNeil Tompkins13 Feb
  • Re: Query Two DatabasesJohn Meyer13 Feb
  • Re: Query Two DatabasesHenrique Dallazuanna13 Feb