New Features of Oracle 11g virtual column partitioning

Source: Internet
Author: User

New Features of Oracle 11g virtual column partitioning

There is a need: a document table should be partitioned by month. If it is on Oracle 10 Gb, only one field can be added. It will be different after the Oracle 11g. You can use virtual column processing.

SQL> select * from v $ version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
PL/SQL Release 11.2.0.1.0-Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0-Production
NLSRTL Version 11.2.0.1.0-Production

SQL> create table t_virtual
(
Object_id number,
Object_name varchar2 (100 ),
Created date
)
Partition by list (to_number (to_char (created, 'mm ')))
(
Partition P1 VALUES (1 ),
Partition P2 VALUES (2 ),
Partition P3 VALUES (3 ),
Partition P4 VALUES (4 ),
Partition P5 VALUES (5 ),
Partition P6 VALUES (6 ),
Partition P7 VALUES (7 ),
Partition P8 VALUES (8 ),
Partition P9 VALUES (9 ),
Partition P10 VALUES (10 ),
Partition P11 VALUES (11 ),
Partition P12 VALUES (12)
);
Partition by list (to_number (to_char (created, 'mm ')))
*
Row 3 has an error:
ORA-00907: missing right brackets

SQL> create table t_virtual
(
Object_id number,
Object_name varchar2 (100 ),
Created date,
Create_year AS (to_number (to_char (created, 'mm ')))
)
Partition by list (create_year)
(
Partition P1 VALUES (1 ),
Partition P2 VALUES (2 ),
Partition P3 VALUES (3 ),
Partition P4 VALUES (4 ),
Partition P5 VALUES (5 ),
Partition P6 VALUES (6 ),
Partition P7 VALUES (7 ),
Partition P8 VALUES (8 ),
Partition P9 VALUES (9 ),
Partition P10 VALUES (10 ),
Partition P11 VALUES (11 ),
Partition P12 VALUES (12)
);

The table has been created.

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Sharing pool for Oracle Performance Optimization

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.