how to get index and keys description [message #375238] |
Tue, 07 August 2001 23:33 |
lana
Messages: 1 Registered: August 2001
|
Junior Member |
|
|
I created a table with an index and a primary key.
I do not know what command to use in order to see
description of table with all its indexes and keys.
Please help.
|
|
|
Re: how to get index and keys description [message #375239 is a reply to message #375238] |
Wed, 08 August 2001 06:39 |
Senthil
Messages: 68 Registered: December 1999
|
Member |
|
|
To describe/get table(e.g. emp) info...
SQL> desc emp
To get index name associated with the table...
SQL> select index_name from user_indexes where table_name = 'EMP';
To get all details about the index...
SQL> select * from user_indexes where table_name = 'EMP'
To get the constraint information...
SQL> select constraint_name, constraint_type from user_constraints where table_name = 'EMP'
To get columns involved in the constraints...
SQL> select constraint_name, column_name, position from user_cons_columns where constraint_name in (select constraint_name from user_constraints where table_name = 'EMP');
HTH.
thanks,
senthil.
|
|
|
|