Create table (structure) from existing table

后端 未结 15 1411
遇见更好的自我
遇见更好的自我 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:04

    I don't know why you want to do that, but try:

    SELECT *
    INTO NewTable
    FROM OldTable
    WHERE 1 = 2
    

    It should work.

提交回复
热议问题