Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> creating indexes script
anyone have any experience rebuilding their indexes into other tablespaces? i'm working on a script, but i'm stuck when it comes to composite indexes and how to populate the columns' field in the create index statement. this is going to come in handy for 800 indexes.
appreciate the help.
script:
select 'create index ' || U.index_name || ' on ' || U.table_name || ' ('
||
column_name || ', ) ' || 'tablespace MY_INDEXES '
from user_indexes U, user_ind_columns C
where U.index_name = C.index_name
-- +------------------------------+Received on Wed May 07 1997 - 00:00:00 CDT
+ Eric Worden +
+ eworden_at_worldramp.net +
+ +
+ 407-306-1343 +
+------------------------------+
![]() |
![]() |