This link contains the answer to the question, but it is not completed.
A Sybase DBMS has a notion of catalogs and schemas. So, how do I write a query to retrieve list of indexes for a table inside schema that is inside catalog?
[EDIT]
Consider following scenario:
USE test
GO
CREATE TABLE dbo.test_table(<field_list>)
GO
CREATE TABLE foo.test_table(<field_list>)
GO
CREATE INDEX test_index ON test_table(<index_field_list>)
GO
As you can see there are 2 test_table tables created: one in the schema called dbo and one in the schema called foo. And so now my question would be - how do I write a query that properly check for existence of the index on the table test_table in the schema foo? Because the link I referenced does not differentiate between those 2 tables and therefore will fail in this case. I very much prefer to filter schema and table names rather than using schemaName.tableName
format. I hope you get an idea. If not please let me know and I will try to explain with even further details.
[/EDIT]