ORA-01732:此视图上的数据操作操作不合法

时间:2012-03-12 16:12:00

标签: oracle

我有这个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表中选择要删除的行 我怎样才能修改

1 个答案:

答案 0 :(得分:3)

您可以使用:

DELETE FROM excelformats
 WHERE rowid not in 
            (SELECT MIN(rowid) 
               FROM excelformats
              GROUP BY key, value, computed); 

根据您所说的三个关键列,这将删除excelformats表中的重复行。

希望它有所帮助...