日期:2014-05-17 浏览次数:20921 次
DECLARE
TYPE ename_table_type IS TABLE OF emp.ename%type
INDEX BY BINARY_INTEGER;
TYPE sal_table_type IS TABLE OF emp.sal%type
INDEX BY BINARY_INTEGER;
ename_table ename_table_type;
sal_table sal_table_type;
sql_stat VARCHAR2(100);
BEGIN
sql_stat:='UPDATE emp SET sal=:percent WHERE deptno=:dno RETURNING ename,sal INTO :name,:salary';
EXECUTE IMMEDIATE sql_stat USING &percent1,&dno RETURNING BULK COLLECT INTO ename_table,sal_table;
FOR i IN 1..ename_table.COUNT LOOP
dbms_output.put_line('雇员'
------解决方案--------------------
ename_table(i)
------解决方案--------------------
'的新工资为'
------解决方案--------------------
sal_table(i));
END LOOP;
END;