当前位置: 代码迷 >> Oracle开发 >> ORA-00911錯誤解决方案
  详细解决方案

ORA-00911錯誤解决方案

热度:42   发布时间:2016-04-24 07:21:22.0
ORA-00911錯誤
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;

------解决方案--------------------
execute immdediate那一句里面有全角空格吧,把空格回车删了重新输入。
  相关解决方案