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 Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am


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