| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> help: How do you find a index which belongs to a primary key
I am writing a script, in which I need to drop all the indexes on that
table.
I use
select index_name from dba_indexes where owner='$owner' and
table_name='$table_name'
and index_type='NORMAL'
The problem is, sometimes the index is associated with a primary key, and the index can not be dropped, so the application will fail.
Could someone tell me how should I improve the above sql so that any indexes which is related to a constraint(primary key) will not be selected?
Thanks for your help. Received on Wed Mar 27 2002 - 21:18:28 CST
![]() |
![]() |