Q

Is there an "equal" syntax when creating a partitioned table?

I have one question for you about Oracle partitioned tables. Is there an "equal" syntax when creating a partitioned table? For example, I created the below table as t_cemal:
 
 CREATE TABLE t_cemal
 (t_no            NUMBER NOT NULL,
  t_date          DATE   NOT NULL,
  t_comments      VARCHAR2(100))
 PARTITION BY RANGE (t_no)
 (PARTITION t_no4 VALUES LESS THAN (5) );
 
But I want:
 PARTITION BY RANGE (t_no)
 (PARTITION t_no4 VALUES EQUAL 5);
What is correct syntax?

Why not create two partitions? The first partition will have all values less than 5. The second partition will have all values less than 6. This second parition can only contain the value five since all values less than five will be in the other partition.

Alternatively, you can look at List Partitioning. With list partitioning, you can have the first partition contains the values "1,2,3,4" and the second partition contain the values "5".

This was first published in May 2005
This Content Component encountered an error

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close