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

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts RC query -Time column CA Products 3
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top