View previous topic :: View next topic |
Author |
Message |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Jan 04, 2007 10:14 am Post subject: need to know the columns on which index is created for table |
|
|
Hai All,
I have a query by which i am using to know the indexes created on a table as below.But i want know to the columns on which the indexes is created for a table.Please help me out.
Code: |
SELECT * FROM SYSIBM.SYSINDEXES WHERE TBNAME LIKE 'ABCD'
NAME CREATOR TBNAME TBCREATOR
------------------ -------- ------------------ ---------
X1 A ABCD A
X2 A ABCD A
X3 A ABCD A
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
|
pvrajs Beginner
Joined: 07 Jan 2005 Posts: 41 Topics: 12
|
Posted: Thu Jan 04, 2007 12:20 pm Post subject: |
|
|
The information could be obtained from SYSIBM.SYSKEYS. You need to provide the index name in your where clause.
SELECT * FROM SYSIBM.SYSKEYS WHERE IXNAME LIKE 'X1%' in your case.
Thanks,
Vijay |
|
Back to top |
|
|
|
|