1、当我执行如下脚本后,仅仅给表TEST2表指定表空间为NET
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
--------------------------------------------------------
2、但是当我执行如下脚本后,却给表分区指定了表空间,表却没有指定表空间
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
partition by range(create_date)
interval(numtoyminterval(1,'MONTH'))
(
partition p_2018 values less than(to_date('2019-01','yyyy-mm'))
)
--------------------------------------------------------------------------
3、当我调整tablespace位置,执行如下脚本后,仍然只是给表分区指定了表空间,表却没有指定表空间
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
partition by range(create_date)
interval(numtoyminterval(1,'MONTH'))
(
partition p_2018 values less than(to_date('2019-01','yyyy-mm'))
) 请问,如何才能一条脚本同时给TEST2表和表分区指定表空间?
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
--------------------------------------------------------
2、但是当我执行如下脚本后,却给表分区指定了表空间,表却没有指定表空间
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
partition by range(create_date)
interval(numtoyminterval(1,'MONTH'))
(
partition p_2018 values less than(to_date('2019-01','yyyy-mm'))
)
--------------------------------------------------------------------------
3、当我调整tablespace位置,执行如下脚本后,仍然只是给表分区指定了表空间,表却没有指定表空间
create table TEST2
(
id VARCHAR2(20),
code VARCHAR2(20),
name VARCHAR2(50),
create_date date
) tablespace NET
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
partition by range(create_date)
interval(numtoyminterval(1,'MONTH'))
(
partition p_2018 values less than(to_date('2019-01','yyyy-mm'))
) 请问,如何才能一条脚本同时给TEST2表和表分区指定表空间?
加在分区后边
参考https://blog.csdn.net/weixin_33786077/article/details/90220978