John Wards <[EMAIL PROTECTED]> wrote:
> 
> I have a a database lest say called "test" which is about a gig in size. I 
> want to take a copy of that database and call it "test2" and have it running 
> on the same server.
> 
> I could just do a dump and then insert the dump back in but this seems a 
> rather long way of doing it. I had a search on the mysql.com site but can't 
> find anything.
> 

You can use CREATE ... SELECT statement:
        http://www.mysql.com/doc/en/CREATE_TABLE.html

but you should create indexes manually.

You can also change output of SHOW CREATE TABLE test and change table name to test2 
and then use INSERT .. SELECT statement.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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]

Reply via email to