下面是我的oracle查询-如何修改查询以在oracle数据库中创建表?我正在使用SQL Developer,请告知-
我想创建一个名为“ Team”的表,其中包含最后一次选择查询的所有列(列名:g,h,a,b,d,e)
WITH
Nam1 as (Select a,b from aaa),
Nam2 as (select d,e from bbb)
Select dd.g
,pp.h
,qq.a
,qq.b
,gg.d
,gg.e
from nam3 dd
join nam4 pp on dd.id = pp.id
join nam1 qq on pp.id = qq.id
join nam2 gg on qq.id = gg.id
谢谢!
答案 0 :(得分:0)
只需在查询中添加CREATE TABLE
语句即可
CREATE TABLE Team AS
WITH
Nam1 as (Select a,b from aaa),
Nam2 as (Select d,e from bbb)
Select dd.g
,pp.h
,qq.a
,qq.b
,gg.d
,gg.e
from nam3 dd
join nam4 pp on dd.id = pp.id
join nam1 qq on pp.id = qq.id
join nam2 gg on qq.id = gg.id;