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

how to find index in a table.


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

New User


Joined: 12 Jun 2005
Posts: 7
Location: hyderabad

PostPosted: Thu Jun 23, 2005 7:34 pm
Reply with quote

1. i have a table employee.it contains coloumns like empname,empid,empaddress,empsal.then what is the query to findout index of the table.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 23, 2005 9:43 pm
Reply with quote

Try to search in system tables with
Code:
SELECT * FROM SYSIBM.SYSINDEXES
WHERE TBNAME = 'yourtable'     

To retrieve the name of your indexes and after, to know the key of the indexes(and its order or sequence) use this:
Code:
SELECT * FROM SYSIBM.SYSKEYS
WHERE IXNAME = 'yourindex'   


I hope in this little help.
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top