안녕하세요..
짧은 식견으로 몇자 적어 봅니다.
현재 님께서 하시려는 작업은 전문용어로 CTAS 입니다.
이는 Create Table as select 의 줄임말이죠..
사용 방법은 이렇습니다.
1) ctas
create table xxx_new
tablespace new_tablespace_name
storage (initial new_initial next new_next freelists new_freelist_number )
as
select * from xxx
order by primary_index_key_values;
2) Parallel ctas
create table vbap_sorted
tablespace vbap_copy
storage (initial 500m
next 50m
maxextents unlimited
)
parallel (degree 4)
as
select *
from
sapr3.vbap
order by
mandt,
vbeln,
posnr;
3) ctas using index hint
create table vbap_sorted
tablespace vbap_copy
storage (initial 500m
next 50m
freelists 30
maxextents unlimited
)
as
select /*+ index(vbap vbap___0) */
*
from
sapr3.vbap
;
4) ctas with order by
create table vbap_sorted
tablespace vbap_copy
storage (initial 500m
next 50m
maxextents unlimited
)
as
select *
from
sapr3.vbap
order by
mandt,
vbeln,
posnr;
5) ctas unrecoverable
Create table new_lips
tablespace lips_b
storage (initial 900m
next 50m
maxextents unlimited
)
parallel (degree 4)
unrecoverable
as
select
from sapr3.lips;
출처 : http://www.dba-oracle.com/t_create_table_select_ctas.htm
그럼 수고하세요..