【发布时间】:2023-03-13 15:06:01
【问题描述】:
当我运行以下块时,我收到错误:
ORA-00904: Invalid identifier in "forall".
有人可以帮我解决吗?
“ID”列是一个 12c 标识列,所以编号。
drop table t1 cascade constraints purge;
create table t1 (
c1 number
);
set serveroutput on;
declare
type l_t2 is table of number;
l_c1 l_t2;
begin
select ID
bulk collect into l_c1
from IDTABLE;
dbms_output.put_line('Number of records: ' || sql%rowcount);
forall i in l_c1.first..l_c1.last
insert into t1 values l_c1(i);
end;
/
【问题讨论】:
标签: oracle plsql sql-insert ora-00904