Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Question Unanswered: how to find if index key is ASC or DESC from system tables?

    There is a index: CustomerInfo_1
    with keys: customerId, EnteryDate DESC
    I could not find where the order of index key (i.e. whether the key is ascending or descending) is stored?
    I tried system tables such as sysindexes and sysindexkeys tables. But could not find it.
    Any help in this regard will be truly appreciated.

    Thank you.
    Anuj Goyal

  2. #2
    Join Date
    Aug 2002
    When defining indexes, you can specify whether the data for each column is stored in ascending or descending order. If neither direction is specified, ascending is the default.

    You can use INDEXKEY_PROPERTY to know the order, refer to books online for more information.
    --Satya SKJ
    Microsoft SQL Server MVP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts