创建以客户 ID 作为参数并显示
他/她的预订的 PLSQL 过程。对于每个预订展示房间号,酒店,开始日期和持续时间
create or replace procedure emp_project(CustID NUMBER)
is
cursor ecur
is
select r.RoomNo, r.HotelName, StartDate, Duration
from Room r, Booking b
where r.RoomNo=b.RoomNo
and r.RoomNo = b.CustID;
begin
for erec in ecur loop
dbms_output.put_line(erec. RoomNo ||' '||erec. HotelName ||' '|| erec. Duration);
end loop;
end;
/
有人可以解释我的参数有什么问题吗?运行时出现此错误:
SQL> exec emp_project
BEGIN emp_project; END;
*ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'EMP_PROJECT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored