How I can find the list of Indexes for a given database in Sybase?
4 Answers
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.

- 772
- 4
- 9
-
sp_helpindex ... perfect! – KornMuffin May 06 '15 at 18:04
To get a complete list of indexes in Sybase ASE we can use the following query -
select si.* from sysobjects so, sysindexes si where so.id = si.id and si.indid > 0
keepin in mind that a simple select between sysobjects system table and the sysindexes table will give table names along with index names if non-clustered indexes exists. Check the following link for more information -
In Sybase version SAP IQ/16, you can get list of indexes with following (table name my_table is case-sensitive):
select *
from sys.sysindexes
where tname = 'my_table';
You may check sybase version as follows:
select @@version

- 1,513
- 15
- 12