List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 13 2002 11:25pm
Subject:RE: Selecting across servers
View as plain text  
At 15:13 -0800 3/13/02, David Buerer wrote:
>How do you do it from different databases on the same server?

Qualify your table names with the database name.

SELECT db1.tbl1.*, db2.tbl2.* FROM db1.tbl1, db2.tbl2 WHERE ...

If db1 or db2 happen to be the current database, you don't need
to qualify references to its tables.

>David Buerer
>Senior Designer
>PLA Designs, Inc.
>-----Original Message-----
>From: Ken Menzel [mailto:kenm@stripped]
>Sent: Wednesday, March 13, 2002 1:21 PM
>To: cal@stripped; mysql@stripped
>Subject: Re: Selecting across servers
>Nope;   two databases on the same server OK,  but not different
>----- Original Message -----
>From: "Cal Evans" <cal@stripped>
>To: <mysql@stripped>
>Sent: Wednesday, March 13, 2002 4:00 PM
>Subject: Selecting across servers
>>  Is it possible to issue 1 select that gathers data from databases on
>>  separate servers?
>>  =C=
>>  *
>>  * Cal Evans
>>  * Journeyman Programmer
>>  * Techno-Mage
>>  *
>>  *
>  > sql, query
Selecting across serversCal Evans13 Mar
  • Re: Selecting across serversKen Menzel13 Mar
  • Re: Selecting across serversPaul DuBois14 Mar
RE: Selecting across serversDavid Buerer14 Mar
RE: Selecting across serversPaul DuBois14 Mar
RE: Selecting across serversGregory Junker14 Mar
RE: Selecting across serversGurhan Ozen14 Mar
  • RE: Selecting across serversDavid Buerer14 Mar