-
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.
Regards,
Anuj Goyal
-
You can find it in em -> design table.
-
SELECT indexkey_property(OBJECT_ID('tablename'),2,1,'IsDe scending')
Look in BOL for indexkey_property
-
Hi, here is the function you can use to determine the order of an Index key (index column):
SELECT indexkey_property(OBJECT_ID('authors'),2,2,'IsDesc ending')
check BOL for the function usage details.
Dim
-
.... didn't refresh my screen before submit the answer, so MAK already answered it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|