我有这个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表中选择要删除的行 我怎样才能修改
答案 0 :(得分:3)
您可以使用:
DELETE FROM excelformats
WHERE rowid not in
(SELECT MIN(rowid)
FROM excelformats
GROUP BY key, value, computed);
根据您所说的三个关键列,这将删除excelformats
表中的重复行。
希望它有所帮助...