* Gohaku
> 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;

You can avoid the DELETE by specifying a non-true WHERE clause:

CREATE TABLE new_table SELECT * FROM table WHERE 1=0

<URL: http://www.mysql.com/doc/en/CREATE_TABLE.html >

You can get the schema for an entire database by using the --no-data option
for the mysqldump utility.

<URL: http://www.mysql.com/doc/en/mysqldump.html >

--
Roger


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

Reply via email to