比如
SQL> begin
update t1 set 1 = 1; === 这里不对 应该是 update t1 set col1=col1 where 1=1;
dbms_output.put_line(sql%rowcount);
update t1 set 1 <> 1; === 这里不对 应该是 update t1 set col1=col1 where 1<>1;
if sql%notfound then
dbms_output.put_line('Not found');
end if
end;
/
[/Quote]
比如
SQL> begin
update t1 set 1 = 1;
dbms_output.put_line(sql%rowcount);
update t1 set 1 <> 1;
if sql%notfound then
dbms_output.put_line('Not found');
end if
end;
/