SQL ScriptIndexes belonging to a tables |
This script lists index details for a given table and index owner. Everyone should have a script that does this !
&tab_name - The table name that the index is on
&own - The index schema owner.
ACCEPT own PROMPT 'Enter value for index owner :
'
ACCEPT tab_name PROMPT 'Enter value for index tables : '
col index_name form a25
col table_name form a10
col column_name form A25
col column_position form 99
break on table_name on index_name
select table_name, index_name, column_name ,column_position
from all_ind_columns
where table_name = UPPER('&tab_name')
and index_owner=UPPER('&own')
order by table_name, index_name,column_position;
Return to Index of SQL Scripts
Home
|
Company Profile
|
Services
|
Contact Us
|
SQL scripts and tips
|
Quiz
|