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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 5
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
Search our Forums:


Back to Top