Re: connect /sellect to 2 dbs

2005-02-23 Thread Gleb Paharenko
Hello.



> Can I select from one db and insert into another?



Yes. For example:

  insert into test2.t2 select a from test.t2;

  

We insert values from table t2 of the database test into table t2

of the test2 database. See:

  http://dev.mysql.com/doc/mysql/en/identifier-qualifiers.html



> also...Can I join to a remote db?



No.







Vic <[EMAIL PROTECTED]> wrote:

> Can I select from one db and insert into another?

> 

> also...Can I join to a remote db?

> 

> tia,

> .V



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: connect /sellect to 2 dbs

2005-02-22 Thread Jay Blanchard
[snip]
Can I select from one db and insert into another?

also...Can I join to a remote db?
[/snip]

Yes, if you can share the connection. Consider...

INSERT INTO db1.tableI (`stuff`)
SELECT `stuff`
FROM db2.tableII

Doing a join to a remote database is not possible as you would have to
have two connections that are aware of each other, so that...

INSERT INTO serverA.db1.tableI (`stuff`)
SELECT `stuff`
FROM serverB.db2.tableII

would work.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



connect /sellect to 2 dbs

2005-02-21 Thread Vic
Can I select from one db and insert into another?
also...Can I join to a remote db?
tia,
.V
--
Forums, Boards, Blogs and News in RiA 
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]