index_colorder

Returns the column order.

Syntax

index_colorder(object_name, index_id, key_#[, user_id])

Parameters

Examples

Usage

index_colorder returns:
  • “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.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute index_colorder.