嘿,任何人都可以帮助解决这个错误:
9/10 PLS-00428: an INTO clause is expected in this SELECT statement
尝试基于单个参数打印详细信息时会出现此问题。这是我一直在使用的代码
CREATE OR REPLACE PROCEDURE PRINT_ACTOR_QUOTES (ID_actor CHAR)
AS
first_name CHAR(30);
last_name CHAR(30);
title CHAR(40);
year NUMBER;
role CHAR(40);
quote CHAR(255);
CURSOR print_cursor IS
SELECT a.actorID, a.firstname, a.lastname, m.title as title, m.year as year ,
r.rolename as role1 , q.quotechar as quote1 FROM movie m, role r, quote q, rolequote
rq, actor a WHERE
a.actorID = r.actorID AND
m.movieID = r.movieID AND
rq.quoteID = q.quoteID AND
rq.roleID = r.roleID;
BEGIN
FOR row IN print_cursor LOOP
SELECT AQ.QUOTES, A.FIRSTNAME, A.LASTNAME
FROM ACTOR_QUOTES AQ, ACTOR A
Where row.actorID = ID_actor;
END LOOP;
END PRINT_ACTOR_QUOTES ;
/