Quick Search:
Oracle PL/SQL Code Library
Find Or Post Oracle Jobs
Oracle Discussion & Chat
 Oracle PL/SQL: Tab Indexes Jump to:  
Category: >> Oracle PL/SQL >> Tab Indexes Bookmark and Share

<< lastnext >>

Snippet Name: Tab Indexes

Description: Returns all indexes and the position of index.

Comment: (none)

Highlight Mode: PLSQL
Last Modified: March 01st, 2009

SET linesize 132;
SET verify off;
--col tblsp      format a20 heading 'Tablespace';
col index_owner format a8 heading 'Owner';
col table_name format a20 heading 'Table Name';
col column_name     format a20 heading 'Column';
col pos        format 999  heading 'Pos';
col unqnss     format a5 heading 'Unique';
break ON table_name skip 1;
SELECT sys.dba_ind_columns.index_owner index_owner,
       sys.dba_indexes.index_name index_name,
       DECODE(sys.dba_indexes.uniqueness,'UNIQUE','YES','NO') unqnss,
       sys.dba_ind_columns.column_name column_name,
       sys.dba_ind_columns.column_position pos
--       sys.dba_indexes.tablespace_name tblsp
FROM sys.dba_ind_columns, sys.dba_indexes
WHERE sys.dba_indexes.index_name = sys.dba_ind_columns.index_name AND
      sys.dba_indexes.table_owner = sys.dba_ind_columns.table_owner AND
      sys.dba_indexes.table_name LIKE UPPER('&1')
ORDER BY sys.dba_ind_columns.index_owner, sys.dba_indexes.index_name, 

Oracle Magazine
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 27 users online    © 2009 psoug.org

Forgot your password?