Create an Oracle Partition Table

Source: Internet
Author: User

I learned about the Partition Table Technology in Oracle today. Now I want to save the statement for creating a partition table here!

SQL> conn system/windows @ study
Connected.

SQL> create tablespace test datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ study \ tes
T. dbf 'size 100 M autoextend on;

The tablespace has been created.
SQL> create tablespace test1 datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ study \ te
St1.dbf 'size 100 M autoextend on;

The tablespace has been created.

SQL> create user test identified by windows default tablespace test;

The user has been created.

SQL> grant connect, resource to test;

Authorization successful.

SQL> commit;

Submitted.

SQL> conn test/windows @ study
Connected.
SQL> create table t_partition_range (id number, name varchar2 (50) partition by r
Ange (id) (partition t_range_p1 values less than (10) tablespace test, partition t _
Range_p2 values less than (20) tablespace test1, partition t_range_p3 values less
Than (30) tablespace users, partition t_range_pmax values less than (maxvalue) t
Ablespace users );

The table has been created.

SQL> insert into t_partition_range values (1, 'www ');

One row has been created.

SQL> insert into t_partition_range values (20, 'www ');

One row has been created.

SQL> insert into t_partition_range values (22, 'www ');

One row has been created.

SQL> insert into t_partition_range values (33, 'www ');

One row has been created.

SQL> insert into t_partition_range values (44, 'www ');

One row has been created.

SQL> commit;

Submitted.

SQL> select * from t_partition_range;

ID NAME
------------------------------------------------------------
1 wwww
20 wwww
22 wwww
33 wwww
44 wwww
SQL> select rowid, t. * from t_partition_range t;

ROWID ID NAME
------------------------------------------------------------------------------

AAAMqpAAFAAAAAWAAA 1 wwww
AAAMqrAAEAAAABGAAA 20 wwww
AAAMqrAAEAAAABGAAB 22 wwww
Aaamqsaaeaaaabaaa 33 wwww
AAAMqsAAEAAAABOAAB 44 wwww

SQL>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.