On Thu, Jan 01, 2004 at 05:42:59PM -0500, Gohaku wrote:
> Hi everyone,
> I was just curious if there's a shorthand way of replicating a Table 
> Schema.
> I use the following to create a new Table with the same schema.
> >create table new_table ( select * from table);
> >delete from new_table;

CREATE TABLE new_table LIKE old_table;

Available from MySQL 4.1 up:
http://www.mysql.com/doc/en/CREATE_TABLE.html

-- 
Chris

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to