IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can I determine what columns make up a index?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Jul 31, 2009 2:53 pm
Reply with quote

From SYSIBM.SYSINDEXES table, we can see the NUNMBER of columns that make up a specific index .

But I cannot find exactly the column names which make up the index.

Can anybody provide me a method to determine this?

Which catalog table should I query?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 31, 2009 3:00 pm
Reply with quote

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH16/CONTENTS?SHELF=&DT=20061207122755#D.83

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH16/E.5?DT=20061207122755
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Jul 31, 2009 7:32 pm
Reply with quote

Dejunzhu,

Quote:
Can anybody provide me a method to determine this?
QUERY

Quote:
Which catalog table should I query?
SYSKEYS

COLNAME in the SYSKEYS is what you are looking for, compare it by creator(index) & ixcreator(keys). order it by COLSEQ(keys).

To know more info about CATALOG tables read SQL REFERENCE catalog tables section.

Sushanth
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Jul 31, 2009 7:43 pm
Reply with quote

HI, Sushanth

Thank you very much! I got it. It really helps a lot.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Increase the number of columns in the... IBM Tools 3
No new posts trying to make sense of keylists TSO/ISPF 11
No new posts Cobol file using index COBOL Programming 2
No new posts DB2 Views with Multiple SQL & Col... DB2 8
Search our Forums:

Back to Top