mysql duplicate table

2002-08-02 Thread adi

How to make a table(table2) with same content of existing table(table1) in
same database(database1) with mysql?
tx in adv for any help
adi




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql duplicate table

2002-08-02 Thread Rafal Jank

On Fri, 02 Aug 2002 16:35:11 +0300
adi [EMAIL PROTECTED] wrote:

 How to make a table(table2) with same content of existing table(table1) in
 same database(database1) with mysql?
 tx in adv for any help
 adi

create table table2 as select * from table1;
You will have to create indexes manually, though. 

-- 
_/_/  _/_/_/  - Rafa Jank [EMAIL PROTECTED] -
 _/  _/  _/  _/   _/ Wirtualna Polska SA   http://www.wp.pl 
  _/_/_/_/  _/_/_/ul. Traugutta 115c, 80-237 Gdansk, tel/fax. (58)5215625
   _/  _/  _/ ==*  http://szukaj.wp.pl *==--

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql duplicate table

2002-08-02 Thread Brent Baisley

Why would you want to replicate your data in the same location on the 
same machine?

You can use an alias name if you need to join a table multiple times in 
a select. Something like this:

select table1.column1,tableA.columnA,tableB.columnA
from table1,table2 as TableA, table2 asTableB
where table1.column2=tableA.column2 AND table1.column3=tableB.column2

Don't know if that's what you are trying to do. But I can't think of any 
reason to permanently replicate a table in the same database.

On Friday, August 2, 2002, at 09:35 AM, adi wrote:

 How to make a table(table2) with same content of existing table(table1) 
 in
 same database(database1) with mysql?
 tx in adv for any help
 adi

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql duplicate table

2002-08-02 Thread David Lloyd


Brent

 Don't know if that's what you are trying to do. But I can't think of any
 reason to permanently replicate a table in the same database.

Maybe the other person is duplicating the data to do test stuff to it...

mysql,query

[I hope the spam thing lets this through]

DSL

-- 
We are not the United States' ally
  We are the 53rd sovereign state
  of the Federation

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php