这是我的包装规格
CREATE OR REPLACE PACKAGE update_pass AS
PROCEDURE passwordalter(currentp VARCHAR2,
newpwd VARCHAR2,
studentid VARCHAR2,
getcount NUMBER);
END update_pass;
/
这是我的包裹身材
CREATE OR REPLACE PACKAGE BODY update_pass AS
PROCEDURE passwordalter(studentid VARCHAR2,
newpwd VARCHAR2,
currentp VARCHAR2,
getcount NUMBER := 0) IS
BEGIN
SELECT COUNT(*)
INTO getcount
FROM users
WHERE student_id = studentid
AND password = md5(currentp);
IF getcount = 1
THEN
UPDATE users
SET password = md5(newpwd)
WHERE student_id = studentid
AND password = md5(currentp);
INSERT INTO users_log
(passwords,
student_id,
updated_by,
action)
VALUES
(md5(currentp),
studentid,
studentid,
'Change');
ELSE
getcount := 0;
END IF;
RETURN getcount;
END passwordalter;
END update_pass;
/
移除内部的end
时出现以下错误。
错误(25,1):PLS-00103:预期以下情况之一时遇到符号“ END”:。 (* @%&=-+; in中的/ /是mod余数,不是rem <>或!=或〜=> = <= <>或like | like2 like4 likec || multiset member submultiset之间的符号“;”被替换为“ END”以继续。