Returns a list of indexes on a single table.
server_name... sp_statistics table_name [, table_owner] [, table_qualifier] [, index_name] [, is_unique]
is the name of the table. The use of wildcard character pattern matching is not supported.
is the owner of the table. The use of wildcard character pattern matching is not supported. If table_owner is not specified, sp_statistics looks for a table owned by the current user.
is ignored. Null should be specified.
is the index name. The use of wildcard character pattern matching is not supported.
is Y to return only unique indexes; otherwise, is N to return both unique and non-unique indexes.
DCSERVER...sp_statistics publishers
table_qualifier table_owner table_name non_unique index_qualifier index_name type seq_in_index column_name collation cardinality pages -------------------------------- -------------------------------- -------------------------------- ---------- -------------------------------- --------------------------- ------ ------------ -------------------------------- -------- ----------- ----------- pubs2 dbo publishers NULL NULL NULL 0 NULL NULL NULL 3 1 pubs2 dbo publishers 0 publishers pubind 1 1 pub_id A 3 1
Table 4-4 describes the results set:
The indexes in the results set appear in ascending order, ordered by the non-unique, type, index_name, and seq_in_index columns.
Any user can execute sp_statistics.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |