CREATE OR REPLACE PROCEDURE check_reviewer (vc_username VARCHAR2, vc_password VARCHAR2) IS
CURSOR cur_reviewer IS
SELECT username, password, reviewer_id
FROM reviewers
WHERE username = vc_username AND password = vc_password;
vn_reviews NUMBER;
BEGIN
FOR rec_cur_reviewer IN cur_reviewer LOOP
IF rec_cur_reviewer.username = vc_username
AND rec_cur_reviewer.password = vc_password
THEN
vn_reviews := func_reviews_from_reviewers(rec_cur_reviewer.reviewer_id);
DBMS_OUTPUT.PUT_LINE('Amount of reviews for reviewer ' || rec_cur_reviewer.reviewer_id || ' is: ' ||vn_reviews);
ELSE
DBMS_OUTPUT.PUT_LINE('NO REVIEWS');
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END check_reviewer;
/
它输出“过程成功完成”而不是DBMS消息。我已经尝试设置serveroutput已经无济于事。