一个删除表中重复记录的有关问题

一个删除表中重复记录的问题
declare
cursor   discursor   is   select   no   from   angle.test;
cursorno   angle.test.no%type;
tempno   angle.test.no%type:=0;
flag   number(1):=0;
begin
for   cursorno   in   discursor
loop
if   (tempno=cursorno.no   and   flag> 0)   then
    delete   from   angle.test   where   no=cursorno;
else
    tempno:=cursorno;
end   if;
flag:=flag+1;
end   loop;
end;
/
上边是小弟我写的一个从表angle.test中删除重复记录的程序,但是编译时出现如下错误,哪位大侠指点一下啊!

ERROR   位于第   10   行:
ORA-06550:   第   10   行,   第   35   列
PLS-00382:   表达式类型错误
ORA-06550:   第   12   行,   第   11   列
PLS-00382:   表达式类型错误
ORA-06550:   第   12   行,   第   3   列
PL/SQL:   Statement   ignored

------解决方案--------------------
不用那么复杂吧.

delete from angle.test where no in(select no from angle.test group by no having count(no)> =2)
------解决方案--------------------
没有这么复杂的,直接用下面语句好了:
Delete from table1 a where rowid!=
(
select max(rowid) from table1 b on a.col1=b.col1
)

------解决方案--------------------
重复的记录全部删除,一楼正确

重复的记录保留一条,二楼正确

------解决方案--------------------
正确