Use LIKE to create an empty table based on the definition of another table, including any column attributes and indexes defined in the original table (see http://dev.mysql.com/doc/refman/5.0/en/create-table.html ).CREATE TABLE new_tbl LIKE orig_tbl;
Maybe something like that, in combination with a SELECT from the table into the new table, and some table renames, would also be an option?
Liz
In reply to Re: Generating ALTER TABLE code for MySQL
by liz
in thread Generating ALTER TABLE code for MySQL
by blogical
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |