查询重复数据
SELECT * from 数据表 WHERE (turbid,rectime) in (select turbid,rectime from 数据表 group by turbid,rectime having count(*)>1)
将原表添加id列保存到新表“数据表_new”
SELECT row_number() over() as id , * into 数据表_new from 数据表 ORDER BY turbid,rectime
将不重复的数据保存到“数据表_noid”
SELECT * into 数据表_noid from 数据表_new WHERE id in (select MIN(id) from 数据表_new group by turbid,rectime)
删除id列:
alter table 数据表_noid drop column id