Create table (structure) from existing table

后端 未结 15 1405
遇见更好的自我
遇见更好的自我 2020-11-27 13:46

How to create new table which structure should be same as another table

I tried

CREATE TABLE dom AS SELECT * FROM dom1 WHERE 1=2

bu

15条回答
  •  时光取名叫无心
    2020-11-27 14:18

    Its probably also worth mentioning that you can do the following:

    Right click the table you want to duplicate > Script Table As > Create To > New Query Editor Window

    Then, where is says the name of the table you just right clicked in the script that has been generated, change the name to what ever you want your new table to be called and click Execute

提交回复
热议问题