#6712·druid

oracle 的with insert为什么要解析出两个statement,初衷是什么

Author: liangchenmCreated Aug 31, 2026Updated Aug 31, 2026

对于oracle sql

with temp as (
	select f1 from tab1
)

insert into tab2 select f1 from temp

会解析出两个statment,第一个为 with temp as ( select f1 from tab1) select from dual,第二个为insert into tab2 select f1 from temp,按理说出现两个statment应该是出现在两个没有关联的SQL中