Home > database >  How Oracle when creating a table to specify table and table partition table space at the same time
How Oracle when creating a table to specify table and table partition table space at the same time

Time:10-18

1, when I execute the following script, only for table TEST2 table to specify the tablespace for.net
The create table TEST2
(
Id VARCHAR2 (20),
Code VARCHAR2 (20),
Name VARCHAR2 (50),
Create_date date
) in tablespace.net
Pctfree 10
Initrans 1
Maxtrans 255
Storage
(
Initial 64 k
Next 1 m
Minextents 1
The maxextents unlimited
)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
2, but when I execute the following script to partition table specifies the table space, table didn't specify the tablespace
The create table TEST2
(
Id VARCHAR2 (20),
Code VARCHAR2 (20),
Name VARCHAR2 (50),
Create_date date
) in tablespace.net
Pctfree 10
Initrans 1
Maxtrans 255
Storage
(
Initial 64 k
Next 1 m
Minextents 1
The maxextents unlimited
)
Partition by range (create_date)
The interval (numtoyminterval (1, 'MONTH'))
(
Partition p_2018 values less than (to_date (' 2019-01 ', 'yyyy - mm))
)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
3, when I adjust the in tablespace location, execute the following script after, still only to partition table specifies the table space, table didn't specify the tablespace
The create table TEST2
(
Id VARCHAR2 (20),
Code VARCHAR2 (20),
Name VARCHAR2 (50),
Create_date date
) in tablespace.net
Pctfree 10
Initrans 1
Maxtrans 255
Storage
(
Initial 64 k
Next 1 m
Minextents 1
The maxextents unlimited
)
Partition by range (create_date)
The interval (numtoyminterval (1, 'MONTH'))
(
Partition p_2018 values less than (to_date (' 2019-01 ', 'yyyy - mm))
)

Excuse me, how can a script and at the same time to TEST2 table and table partition to specify the tablespace?

CodePudding user response:

Partition p_2018 values less than (to_date (' 2019-01 ', 'yyyy - mm)) in tablespace XXX
Behind the partition

CodePudding user response:

In addition with the store in
Refer to https://blog.csdn.net/weixin_33786077/article/details/90220978

CodePudding user response:

Thank you, but my question is focused on "at the same time to specify table and table partition table space", rather than to the predefined partitioning and extended partition specify table space!

STORE IN and partition p_2018 values less than (to_date (' 2019-01 ', 'yyyy - mm)) IN tablespace XXX is merely to predefined partitioning and extended partition table space is specified,

CodePudding user response:

Level 1 table space partition table definition is meaningless, because the segment is in the division level
  • Related