【发布时间】:2016-06-14 16:57:45
【问题描述】:
我正在尝试在我的 INSERT 中使用公用表表达式。 当我这样做时:
with A as (select col1,col2 from table1) select * from A
有效 但是当我这样做时:
with A as (select col1,col2 from table1)
insert into table2 (col1,col2) (select col1,col2 from A)
我明白了:
found "INSERT" (at char XXXXX) expecting `SELECT' or `'(''
【问题讨论】:
-
你用的是什么数据库?
标签: sql common-table-expression netezza