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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Detecting an index

Re: Detecting an index

From: Stephen B <stephen.bell_at_cgi.ca>
Date: Mon, 7 Jan 2002 14:09:30 -0500
Message-ID: <cpm_7.6827$qC1.1067549@news20.bellglobal.com>


Hi Brent,

Look at the USER_INDEXES view...(or DBA_INDEXES, ALL_INDEXES as appropriate)

You can construct a number of different queries to get what you want...example using your post might be

SELECT TABLE_NAME
FROM USER_INDEXES
WHERE INDEX NAME = 'TABLE_FIELD_IDX'; or

SELECT INDEX_NAME
FROM DBA_INDEXES
WHERE TABLE_NAME = 'CUSTOMER'; Hope this helps,

Steve

"brent" <brent_at_interactivetools.com> wrote in message news:3ed8e2d1.0201071059.4b2395ec_at_posting.google.com...
> How does one detect whether an index exists.
> i.e.
> CREATE INDEX table_field_idx ON table (field);
>
> SELECT .... FROM ... WHERE name='table_field_idx';
>
> Thanks in advance
Received on Mon Jan 07 2002 - 13:09:30 CST

Original text of this message

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