how to find if index key is DESC from sys 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.

    Regards,

    Anuj Goyal

  • Do a sp_helpindex on your table. The "index_keys" column will have a (-) next to the column that is descending, otherwise it will show nothing if ascending.

    Darren


    Darren

  • indexkey_property (see help for this key word) gets the index key properties

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply