[求助]公共表达式产生的值怎么存入到表中
使用with写了一个递归语句,能产生正确的值。with aaa (...) as (
.......
)
select * from aaa
此语句执行成功,可是我想将结果保存到表中:
with aaa (...) as (
.......
)
insert into bbb
select * from aaa
却报Expected tokens may include "from",我想也许DB2不支持这种写法,于是:
insert into bbb select * from (
with aaa (...) as (
.......
)select * from aaa
)
却报An unexpected token "as" was found ....
但在oracle中上,这种用法是可以的。难道db2的with语句产生的结果只能看看,不能存表?求高人指点。 try
insert into bbb
with aaa (...) as (
.......
)select * from aaa
页:
[1]