Enable an Index example
In Oracle database to enable an index you must use the command alter index with rebuild keyword. The status of index will change from unusable to valid.
-- enable Index using REBUILD ALTER INDEX STU_LN_IDX REBUILD;
Output:
index STU_LN_IDX altered.
Check indexes
select INDEX_NAME, INDEX_TYPE, STATUS from USER_INDEXES WHERE table_name='STUDENTS_LIST';
Output:
INDEX_NAME | INDEX_TYPE | STATUS |
---|---|---|
STUDENT_IDX | NORMAL | VALID |
STU_LN_IDX | NORMAL | VALID |