Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    21

    Unanswered: How to see the indexes on DB2 Tables

    What is the command to see the existing indexes on a DB2 table.


    Thanks
    Dss

  2. #2
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165
    SELECT INDNAME, DEFINER, TABSCHEMA, TABNAME,
    COLNAMES, COLCOUNT, UNIQUERULE, INDEXTYPE
    FROM SYSCAT.INDEXES
    WHERE TABSCHEMA NOT LIKE 'SYS%' AND
    TABNAME = 'TABLE_NAME'

    SOURCE: http://www.devx.com/dbzone/Article/29585/0/page/4

    Thanks,
    Newbie

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Assuming DB2 for LUW (please give DB2 version and OS next time):

    SELECT indschema,INDNAME from syscat.indexes where tabname = 'MYTABLE' and tabschema = 'MYSCHEMA'

    Andy

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    describe indexes for table ... [show detail]
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •