CREATE TABLE LIKE A1 as A2

后端 未结 5 849
猫巷女王i
猫巷女王i 2020-12-14 14:14

I want to create a new table with properties of an old table and without duplicates. I want to do something like this:

CREATE TABLE New_Users  LIKE Old_Users         


        
5条回答
  •  没有蜡笔的小新
    2020-12-14 14:58

    You can use below query to create table and insert distinct values into this table:

    Select Distinct Column1, Column2, Column3 into New_Users from Old_Users
    

提交回复
热议问题