-1

此查询的输出为我提供了表中的重复行,

select * from rinex1 where rid not in 
  (select min(rid) from rinex1 group by rinex_version,type);

现在我想使用这个查询删除它们,

delete from rinex1 where rid not in 
  (select min(rid) from rinex1 group by rinex_version,type); 

它给出了以下错误:

您不能在 FROM 子句中指定目标表 'rinexo' 进行更新

我应该怎么办?

4

1 回答 1

0

尝试,

DELETE FROM rinex1 
WHERE rid NOT IN 
    (SELECT MIN(rid) 
     FROM rinex1 
     GROUP BY rinex_version, type
    ) AS p ;
于 2013-07-09T03:41:12.660 回答