How I can find the list of Sybase Indexes for a given database?

aartist picture aartist · Sep 23, 2009 · Viewed 33.3k times · Source

How I can find the list of Indexes for a given database in Sybase?

Answer

Paul Harrington picture Paul Harrington · Sep 24, 2009
Query against sysobjects and sysindexes:
SELECT o.name,
       i.name
  FROM sysobjects o
  JOIN sysindexes i
    ON (o.id = i.id)

Documentation on the interpretation of the sysobjects and sysindexes system tables is available on the Sybase web-site.

Load up stored procedure library from http://www.edbarlow.com/ and type in sp__helpindex

or use the Sybase-provided sp_helpindex which expects the table-name as a parameter.