Re: MySQL rename and indexes

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Alex Dean
Date:  
To: Main PLUG discussion list
Subject: Re: MySQL rename and indexes

On Nov 3, 2006, at 6:35 PM, der.hans wrote:

>> Any tips on creating a new table and indexes based on another
>> table and
>> its indexes?


To create a new table based on an existing one, you can to this :
"CREATE TABLE new_table LIKE old_table"

This is just the column and index information. If you also want the
data, next do : "INSERT INTO new_table SELECT * FROM old_table"

regards,
alex
.



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss