How to make this work ?

2006-09-01 Thread ravi.karatagi

Hi All,

  How to make this work CREATE TABLE DB2.tblname LIKE DB1.tblname;

Can we have simultaneous connections with 2 DBs?



Regards,

Ravi K






The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Re: How to make this work ?

2006-09-01 Thread Christian Hammers
On Fri, Sep 01, 2006 at 03:17:14PM +0530, [EMAIL PROTECTED] wrote:
   How to make this work CREATE TABLE DB2.tblname LIKE DB1.tblname;
It does work perfectly with 5.0. Mabe cross-database queries didn't work
with earlier versions? Which version do you use?

 Can we have simultaneous connections with 2 DBs?
Using /usr/bin/mysql? Even with one connection you can access as much
databases as you like. Even a join of tables from different databases
work.

bye,

-christian-


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



RE: How to make this work ?

2006-09-01 Thread Mikhail Berman
Hi Ravi,

If you are working with one of *NIX, you can try to use

$mysqldump --no-data DB1 tblname | mysql DB2

--no-data switch will dump only data base structure

Regards,

Mikhail Berman

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 5:47 AM
To: mysql@lists.mysql.com
Subject: How to make this work ?


Hi All,

  How to make this work CREATE TABLE DB2.tblname LIKE DB1.tblname;

Can we have simultaneous connections with 2 DBs?





Regards,

Ravi K







The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.


www.wipro.com

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



Re: How to make this work ?

2006-09-01 Thread Dan Trainor

Mikhail Berman wrote:

Hi Ravi,

If you are working with one of *NIX, you can try to use

$mysqldump --no-data DB1 tblname | mysql DB2

--no-data switch will dump only data base structure

Regards,

Mikhail Berman

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 5:47 AM

To: mysql@lists.mysql.com
Subject: How to make this work ?


Hi All,

  How to make this work CREATE TABLE DB2.tblname LIKE DB1.tblname;

Can we have simultaneous connections with 2 DBs?





Regards,

Ravi K





Hi -

You can also do a:

CREATE TABLE newtable SELECT * FROM oldtable;

I use this often for creating backups before I run code in testing.

Thanks
-dant


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