Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query to identify the index developed on field of the table?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Nagendran

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Fri Aug 31, 2007 4:51 am    Post subject: Query to identify the index developed on field of the table?
Reply with quote

Hi,

I need to know the indexed fields in a DB2 table?

Is there any query?

If i use SYSIBM.SYSINDEX i am getting only the index name, i didnt get the fields for the particular index.

Regards,
Nagu.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Aug 31, 2007 5:32 am    Post subject: Re: Query to identify the index developed on field of the ta
Reply with quote

Nagendran wrote:
Hi,

I need to know the indexed fields in a DB2 table?

Is there any query?

If i use SYSIBM.SYSINDEX i am getting only the index name, i didnt get the fields for the particular index.

Regards,
Nagu.


Code:
SELECT A.TBNAME, A.NAME, A.UNIQUERULE, A.CLUSTERING, B.COLNAME,  B.ORDERING, B.COLSEQ                                         
FROM SCB.SYSINDEXES A, SCB.SYSKEYS B                           
WHERE B.IXNAME = A.NAME                                         
ORDER BY 2, 7;                                       
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us