Returns the column order.
index_colorder(object_name, index_id, key_#[, user_id])
select name, index_colorder("sales", indid, 2) from sysindexes where id = object_id ("sales") and indid > 0
name ------------------------- ------------------------- salesind DESC
“ASC” for columns in ascending order
“DESC” for columns in descending order.
NULL if object_name is not a table name or if key_# is not a valid key number.
See also Transact-SQL Users Guide.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute index_colorder.