Nagendran
New User
Joined: 24 Jan 2007 Posts: 89 Location: USA
|
|
|
|
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. |
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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;
|
|
|