【发布时间】:2020-12-12 05:33:15
【问题描述】:
尝试使用显式光标显示值,但显示以下错误。
SQL> @C:\Users\91800\Desktop\explicit.sql; SP2-0552:未声明绑定变量“C_CUST”。
代码如下:
Declare
c_id customer.id %type;
c_name customer.name %type;
c_add customer.address %type;
cursor c_cust IS select id , name , address from customers;
begin
open c_cust;
loop
fetch c_cust into c_id , c_name , c_add;
exit when: c_cust %not found;
dbms_output.put_line(c_id||' '||c_name||' '||c_add);
end loop;
close c_cust;
end;
/
【问题讨论】: