select count(1) into tmpCount from tablename where .... and rownum < 2;应该用这种方法
还有一种思路,效率也没测试过,是在外国一个产品中偷学的。 declare cursor c_exist is select 'x' from tablename where ......; begin ... open c_exist; loop if c_exist%notfound then .... else ... end if; end loop; end; 大家发表点看法吧!
declare
cursor c_exist is
select 'x' from tablename where ......;
begin
...
open c_exist;
loop
if c_exist%notfound then
....
else
...
end if;
end loop;
end;
大家发表点看法吧!
上次测试的不准确,谁来测试一下
我很奇怪为什么大家都用
SELECT COUNT(1)这个办法
明明可以用游标来处理吗
—————————————————————————————————
该死的CSDN,把旧帖子都TMD删了,气死我了!!!