Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: List all indexed columns for a given table Jump to:  
Category: >> Oracle PL/SQL >> List all indexed columns for a given table Bookmark and Share

<< lastnext >>

Snippet Name: List all indexed columns for a given table

Description: Easy way to list all indexed columns for a given table.

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 02nd, 2009

break ON index_name skip 1
col index_name  format a30
col uniuenes    format a12
col column_name format a30
 
prompt Indexes FOR TABLE: &&1
SELECT c.index_name, i.uniqueness, c.column_name
FROM   user_indexes i, user_ind_columns c
WHERE  i.index_name = c.index_name
  AND  i.table_name = UPPER('&&1')
ORDER  BY c.index_name, c.column_position
/
 
undef 1
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 78 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?