How To List All Indexes in Your Schema?
SQL tutorial | Interview questions | Oracle :: Interview questions :: Oracle DBA Interview questions
Page 1 of 1
How To List All Indexes in Your Schema?
If you log in with your Oracle account, and you want to get a list of all indexes in your schema,
you can get it through the USER_INDEXES view with a SELECT statement, as shown in the
following SQL script:
SELECT index_name, table_name, uniqueness
FROM USER_INDEXES WHERE table_name = 'EMPLOYEES';
INDEX_NAME TABLE_NAME UNIQUENES
----------------------- --------------------- ---------
EMP_EMAIL_UK EMPLOYEES UNIQUE
EMP_EMP_ID_PK EMPLOYEES UNIQUE
EMP_DEPARTMENT_IX EMPLOYEES NONUNIQUE
EMP_JOB_IX EMPLOYEES NONUNIQUE
EMP_MANAGER_IX EMPLOYEES NONUNIQUE
EMP_NAME_IX EMPLOYEES NONUNIQUE
As you can see, the pre-defined table EMPLOYEES has 6 indexes defined in the default sample
database.
you can get it through the USER_INDEXES view with a SELECT statement, as shown in the
following SQL script:
SELECT index_name, table_name, uniqueness
FROM USER_INDEXES WHERE table_name = 'EMPLOYEES';
INDEX_NAME TABLE_NAME UNIQUENES
----------------------- --------------------- ---------
EMP_EMAIL_UK EMPLOYEES UNIQUE
EMP_EMP_ID_PK EMPLOYEES UNIQUE
EMP_DEPARTMENT_IX EMPLOYEES NONUNIQUE
EMP_JOB_IX EMPLOYEES NONUNIQUE
EMP_MANAGER_IX EMPLOYEES NONUNIQUE
EMP_NAME_IX EMPLOYEES NONUNIQUE
As you can see, the pre-defined table EMPLOYEES has 6 indexes defined in the default sample
database.
Similar topics
» How To List All Tables in Your Schema?
» What Happens to Indexes If You Drop a Table?
» What Happens to the Indexes If a Table Is Recovered?
» What is a Database Schema?
» How To Create a New Table in Your Schema?
» What Happens to Indexes If You Drop a Table?
» What Happens to the Indexes If a Table Is Recovered?
» What is a Database Schema?
» How To Create a New Table in Your Schema?
SQL tutorial | Interview questions | Oracle :: Interview questions :: Oracle DBA Interview questions
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal