Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a table like this:

CREATE TABLE employees
(employee_id NUMBER(4) NOT NULL,
 last_name VARCHAR2(10), 
 department_id NUMBER(2))
PARTITION BY RANGE (department_id)
(PARTITION employees_part1 VALUES LESS THAN (11) , 
 PARTITION employees_part2 VALUES LESS THAN (21) , 
 PARTITION employees_part3 VALUES LESS THAN (31) );

Are these statements the same?

CREATE INDEX employees_local_idx ON employees (employee_id) LOCAL;

CREATE INDEX employees_local_idx ON employees (employee_id) LOCAL
(
 PARTITION employees_part1, 
 PARTITION employees_part2, 
 PARTITION employees_part3
)

Thanks,

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Quoting from docs, these are the same:

If you specify this clause [i.e. LOCAL (...)], then the number of PARTITION clauses must be equal to the number of table partitions, and in the same order. If you omit partition, then Oracle Database generates a name that is consistent with the corresponding table partition.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.