Code
/**
* 参数:
*uid:账号
*pwd:密码
*p_return:返回值:1表示登录成功:2:表示登录失败
*
**/
create or replace procedure PR_Login(uid in varchar2,
pwd in varchar2,
p_return out number) is
begin
select count(id)
into p_return
from admin
where username = uid
and password = pwd;
if p_return > 0 then
p_return := 1;
else
p_return := 0;
end if;
end PR_Login;