declare
v_f1 t1.f1%type;
v_f2 t1.f2%type;
cursor aa is select f1,f2 from t1;
begin
open aa;
loop;
fetch aa into v_f1,v_f2;
exit when aa%notfound;
end loop;
close aa;
end;
RecNum int;
。。。
select count(*) into RecNum from TestTab where (User_ID = AUserID) and (User_Name=AUserName);
数据库中没有记录时,RecNum竟然会返回1????
在Sql*plus正常!!!
select count(*) from TestTab where (User_ID = AUserID) and (User_Name=AUserName);