-----Create a table space
Create tablespace mytablespace_1 datafile ' c:/oracle/product/10.1.0/oradata/mydata/mytablespace1.dbf '
size 100m Extent management Local uniform size 256K
Create tablespace mytablespace_2 datafile ' c:/oracle/product/10.1.0/ ORADATA/MYDATA/MYTABLESPACE2.DBF '
size 100m extent management local uniform size 256K
Create tablespace Mytablespace_3 datafile ' c:/oracle/product/10.1.0/oradata/mydata/mytablespace3.dbf '
size 100m extent management Local Uniform size 256k</span>
-----Create partitions
CREATE TABLE MyTest
(
ID number,
name NVARCHAR2) partition by
range (ID)
(
Partition T1 values less than (MB) tablespace mytablespace_1, partition
T2 values less than (1000) tablespace myTable space_2,
partition T3 values less than (MaxValue) tablespace mytablespace_3)-----Setup table can modify
ALTER TABLE MYTEST2 Enable Row movement;</span>
-----Insert data into a partitioned table
INSERT into MyTest values (' f1111 ');
INSERT into MyTest values (' f1112 ');
INSERT into MyTest values (M, ' f1112 ');
INSERT into MyTest values (' f1112 ');
INSERT into MyTest values (1001, ' f1112 ');
Commit;</span>
------Query Partition Table
SELECT * FROM MyTest
select * MyTest partition (T1);
SELECT * from MyTest partition (T2);
SELECT * from MyTest partition (T3);</span>
------Deletes a table partition, while data from some table partitions will also be deleted
ALTER TABLE myTest DROP PARTITION T3; </span>
------Inserts a table partition that must be inserted at the maximum table partition
ALTER TABLE MyTest add partition T3 values less than (10000) tablespace mytablespace_3;</span>