急救:请问该存储过程错在哪里?
(username varchar2,passwords varchar2,V_RESULT out number) as
usernames varchar2(20):=username;
passwordss varchar2(20):=passwords;
begin
select count(*) into V_RESULT from A
where admin_id=(select userid from B
where passwords=passwordss and username=usernames
);
EXCEPTION
WHEN NO_DATA_FOUND THEN
V_RESULT:=0;
WHEN OTHERS THEN
V_RESULT:=0;
commit;
end bbs_admincheck;
我对照了A和B两张表,存在相同的记录,可是V_RESULT的返回值总是 0 ,为什么得不到真实值呢?