6 messages in com.mysql.lists.mysqlRE: create tmp table of column list o...
FromSent OnAttachments
hong chen05 Apr 2002 14:13 
Alex Behrens05 Apr 2002 14:23 
hong chen05 Apr 2002 14:42 
Gurhan Ozen05 Apr 2002 14:43 
hong chen05 Apr 2002 14:51 
hong chen05 Apr 2002 15:03 
Subject:RE: create tmp table of column list of a table for future use
From:Gurhan Ozen (c-gu@wcom.com)
Date:04/05/2002 02:43:20 PM
List:com.mysql.lists.mysql

Are you trying to create a new table with an existing table's structure only ? or with the structure and data? If you just wanna duplicate a table with the data inside it you can use CREATE TABLE .. SELECT ... syntax. More info is at: http://www.mysql.com/doc/C/R/CREATE_TABLE.html

IF you just wanna copy the structure, do a SHOW CREATE TABLE on the existing table and copy and paste its CREATE TABLE syntax to create the new one with a different name. See more info at: http://www.mysql.com/doc/S/H/SHOW_CREATE_TABLE.html

Gurhan

-----Original Message----- From: hong chen [mailto:hong@Zeborg.com] Sent: Friday, April 05, 2002 5:13 PM To: mys@lists.mysql.com Subject: create tmp table of column list of a table for future use

mysql> create table column_list (desc MYTABLE_NAME);

ERROR 1064: You have an error in your SQL syntax near 'desc MYTABLE_NAME)' at line 1

Anyone know how to make something like it?

To request this thread, e-mail <mysq@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-c-gurhan.ozen=wcom@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php