How to identify all the Oracle indexes created with the DESC clause

I like to identify all the indexes created with the descending clause. I like to re-create some of  these indexes with the asc clause  which is the default. I need to know all the indexes already created as Descending Indexes. Please help me identify this.
OranewAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve WalesSenior Database AdministratorCommented:
You can get that by querying dba_ind_columns:

SYS@demo> desc dba_ind_columns
 Name                                                                     Null?    Type
 ------------------------------------------------------------------------ -------- -------------------------------------------------
 INDEX_OWNER                                                              NOT NULL VARCHAR2(30)
 INDEX_NAME                                                               NOT NULL VARCHAR2(30)
 TABLE_OWNER                                                              NOT NULL VARCHAR2(30)
 TABLE_NAME                                                               NOT NULL VARCHAR2(30)
 COLUMN_NAME                                                                       VARCHAR2(4000)
 COLUMN_POSITION                                                          NOT NULL NUMBER
 COLUMN_LENGTH                                                            NOT NULL NUMBER
 CHAR_LENGTH                                                                       NUMBER
 DESCEND                                                                           VARCHAR2(4)

Open in new window


Or, here's a point to the detailed description of this view from the docs: http://docs.oracle.com/database/121/REFRN/GUID-2A73036B-502E-4D93-9C98-DEDE234872AA.htm#REFRN20084
DavidSenior Oracle Database AdministratorCommented:
SELECT index_owner, index_name, column_name
FROM dba_ind_columns
WHERE descend = 'DESC'
/

Note, use all_ind_columns for the current schema if you do not have access to the DBA views.

If you end up using the above statement as a subquery when you ALTER INDEX, there are lots of clear examples defining subqueries.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.