2006/1/11, George Law <[EMAIL PROTECTED]>:
> Hi All,
>
>
[snip]

>
> I have to work on an automatic way to rotate these tables every week.
> Is there an easy way with SQL to create a new table based on the schema
> of an existing table?
>


I believe CREATE TABLE newtbl SELECT blah... is what you're after :
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
FTFM :
 You can create one table from another by adding a SELECT statement at
the end of the CREATE TABLE statement:

CREATE TABLE new_tbl SELECT * FROM orig_tbl;


--
Pooly
Webzine Rock : http://www.w-fenec.org/

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

Reply via email to