oracle 临时表重复插入数据报错
在PL/SQL执行
程序代码:
CREATE GLOBAL TEMPORARY TABLE temp
(
a int,
b char(32),
c decimal(20,4),
d decimal(20,4)
)
ON COMMIT delete ROWS
insert into temp(a,b,c)
select 2, 2,2 from dual
insert into temp(a,b,d)
select 2, 2,2 from dual
同时执行INSERT代码
错误提示SQL命令为正确执行
求解!!!!!
------解决方案--------------------两个sql放一块执行 中间要加分号啊
insert into temp(a,b,c)
select 2, 2,2 from dual
;
insert into temp(a,b,d)
select 2, 2,2 from dual
------解决方案----------------------少了3个分号
CREATE GLOBAL TEMPORARY TABLE temp
(
a int,
b char(32),
c decimal(20,4),
d decimal(20,4)
)
ON COMMIT delete ROWS;
insert into temp(a,b,c)
select 2, 2,2 from dual;
insert into temp(a,b,d)
select 2, 2,2 from dual;