Create table in MySQL that matches another table?

后端 未结 4 818
鱼传尺愫
鱼传尺愫 2020-12-07 16:33

I am using MySQL. I have a table called EMP, and now I need create one more table (EMP_TWO) with same schema, same columns, and same constraints. How can I do this?

4条回答
  •  执笔经年
    2020-12-07 17:00

    Create table in MySQL that matches another table? Ans:

    CREATE TABLE new_table AS SELECT * FROM old_table;
    

提交回复
热议问题