参考博文:https://www.cnblogs.com/godbell/p/8727804.html
DELETE C FROM City C JOIN ( SELECT MIN(Id) Id,Name FROM dbo.City GROUP BY Name HAVING COUNT(1) > 1 ) TMP ON C.Name = TMP.Name AND C.Id <> TMP.Id
使用的时候,神通不支持,采用的DELETE WHERE IN的处理方式。
create table table_name_new as select * from table_name_old
参考博文:https://www.cnblogs.com/bingyublog/p/7825069.html
CREATE TABLE 新表 LIKE 旧表
针对不同的场景使用。