【发布时间】:2018-02-04 04:29:45
【问题描述】:
下面的程序执行得很好,但是里面的“dbms”没有打印任何输出。(程序的意思是记下工资尚未输入表中的雇员的名字) 该表有两列,即 1)name_of_emp 2)salary (默认 0)
create or replace procedure add_sal_info
as
cursor c is select * from emp_earnings;
cname varchar2(30);
csal number(5);
begin
open c;
while(c%found) loop
fetch c into cname, csal;
if (csal = 0) then
dbms_output.put_line('enter salary for : ' ||' '|| cname);
end if;
end loop;
close c;
end;
/
服务器输出设置为“开”,我在执行时收到消息“程序已成功完成”,但它不打印未输入工资的员工的姓名(表中有一些)。 这里有什么症结吗?
【问题讨论】:
标签: sql stored-procedures plsql oracle10g plsqldeveloper