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