CREATE TABLE new_table SELECT * FROM old_table LIMIT 0;
- Original Message -
From: Jason <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 15, 2002 10:44 AM
Subject: Is there a sql query to Copying tables
Is there an easy way to copy/use the structure (not data) of a skele
> Is there an easy way to copy/use the structure (not data) of a skeleton
table to a new table?
create table x select * from table y where 1=0;
-Lance
filter: sql
-
Before posting, please check:
http://www.mysql.com/manual
Hi,
You can just do "SHOW CREATE TABLE ..." and copy+paste it with a different
table name in the command line..
See: http://www.mysql.com/doc/S/H/SHOW_CREATE_TABLE.html
Or else, if you are using phpMyAdmin , you can do it with a mouse click.
Gurhan
-Original Message-
From: Jason [mail