Re: duplicate a table

From: Date: Mon, 02 Apr 2001 20:00:50 +0000
Subject: Re: duplicate a table
Groups: php.general 
Request: Send a blank email to php-general+get-46671@lists.php.net to get a copy of this message
"McShen" <webmaster@celebritieszones.com> wrote: > how do i duplicate a table? > i tried > create table refer2 select * from refer; > create table refer2 as select * from refer; > > they didn't work. > my mysql version is mysql 3.22.28, This has nothing to do with PHP - you should post to the MySQL list instead. Anyway, the first SQL statement you tried will work in MySQL 3.23x, but not 3.22x. You'll need to upgrade to 3.23, use SELECT INTO OUTFILE then import back into a new table after creating it, or use mysqldump or another utility to create INSERT statements from your table, edit the table name and then use MySQL to run the INSERTs. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#46671) next »