📄 pkg_student.~bdy
字号:
create or replace package body pkg_student is
--登陆********************************************************************************
procedure prc_login(v_username varchar2,v_pwd varchar2,ResultCursor out rc_class)
IS
icount number(2);
--flag char(1);
BEGIN
select count(*) into icount from users where username = v_username;
if icount = 0 then
open ResultCursor for
select '用户名不存在' as "op_type" from dual;
else
begin
select count(*) into icount from users where username = v_username and password=v_pwd;
if icount = 0 then
open ResultCursor for
select '密码错误' as "op_type" from dual;
else
begin
select count(*) into icount from users where username = v_username and password=v_pwd and user_level = 'A';
if icount = 0 then
open ResultCursor for
select '一般用户暂时不能登陆' as "op_type" from dual;
else
open ResultCursor for
select '欢迎进入选课系统' as "op_type" from dual;
end if;
end;
end if;
end;
end if;
END ;
--学生管理
end pkg_student;
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -