Oracle local partition index

indexoracle

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,

Best Answer

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.