MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need to know the columns on which index is created for table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Thu Jan 04, 2007 10:14 am    Post subject: need to know the columns on which index is created for table Reply with quote

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
View user's profile Send private message
pvrajs
Beginner


Joined: 07 Jan 2005
Posts: 41
Topics: 12

PostPosted: Thu Jan 04, 2007 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group