我有一条DML语句..
delete from (select key,value,computed, row_number() OVER (Partition By key, value order by seq asc) as a
from excelformats a )
where A > 1
然后这个抛出
ORA-01732: data manipulation operation not legal on this view
这条语句基本上是从excelFormats表中选择重复的行,那些要删除的行,如何修改才能
发布于 2012-03-13 00:15:30
您可以使用:
DELETE FROM excelformats
WHERE rowid not in
(SELECT MIN(rowid)
FROM excelformats
GROUP BY key, value, computed);
这将删除excelformats
表中的重复行,给出您声明的三个键列。
希望这能帮上忙。
https://stackoverflow.com/questions/9670664
复制相似问题