执行存储过程报错,报对象XXX.proc 无效 create or replace procedure temp_1(type varchar2(100)) is emp_record employees%rowtype; CURSOR emp_cursor IS SELECT * FROM employees where to_date('2008/10/1','yyyy/MM/dd')-hiredate>6*30 and pay_type = type for update; begin for emp_record in emp_cursor loop dbms_output.put_line(emp_record.name||' '||emp_record.saraly); --通过游标更改数据 --update employees set sal = emp_record.salary*1.1 WHERE CURRENT OF emp_cursor; dbms_output.put_line(emp_record.name||' '||emp_record.saraly); end loop; end temp_1;
create or replace procedure temp_1(pi_type varchar2) is emp_record employees%rowtype; CURSOR emp_cursor IS SELECT * FROM employees where to_date('2008/10/1', 'yyyy/MM/dd') - hiredate > 6 * 30 and pay_type = pi_type for update; begin for emp_record in emp_cursor loop dbms_output.put_line(emp_record.name ------解决方案-------------------- ' ' ------解决方案-------------------- emp_record.saraly); --通过游标更改数据 --update employees set sal = emp_record.salary*1.1 WHERE CURRENT OF emp_cursor; dbms_output.put_line(emp_record.name ------解决方案-------------------- ' ' ------解决方案-------------------- emp_record.saraly); end loop; end temp_1;