Apr 28, 2017

[HDGEM] How to create an empty table based on the definition of another table in MySQL

Use CREATE TABLE ... LIKE to create an empty table based on the definition of another table, including any column attributes and indexes defined in the original table:
CREATE TABLE new_tbl LIKE orig_tbl;  


--
Posted By Blogger to HDGEM at 4/28/2017 01:01:00 PM
Post a Comment

Featured Post

Datasets

Google Tables helps you search thousands of public Fusion Tables, or millions of public tables from around the web you can import to Fusio...