Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create table in MySQL
Message
From
10/10/2010 04:49:54
 
 
To
10/10/2010 03:18:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01484595
Message ID:
01484597
Views:
50
>I want to create two similar tables in MySQL.
>
>is it possible to copy from one table to another, instead of create the table manually?
>
>thanks

If you just want to create an empty table structure:
CREATE TABLE new_table LIKE original_table;
If you want to capture table data, you may create the table, as above, and then
INSERT INTO new_table SELECT * FROM original_table;
or execute it in one go (but not all table definitions are recreated this way):
CREATE TABLE new_table SELECT * FROM original_table;
----------------------------------
António Tavares Lopes
Previous
Reply
Map
View

Click here to load this message in the networking platform