Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Detecting an index
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
![]() |
![]() |