views:

580

answers:

1

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

+2  A: 
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.

Paul Harrington