Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> help: How do you find a index which belongs to a primary key

help: How do you find a index which belongs to a primary key

From: Joe Sath <dbadba62_at_hotmail.com>
Date: Thu, 28 Mar 2002 03:18:28 GMT
Message-ID: <8Yvo8.26546$n8.651@nwrddc02.gnilink.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US