Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Index Order (Ascending or Descending)!!!!

Author  Topic 

tushar149
Starting Member

1 Post

Posted - 2006-09-25 : 02:46:28
Hi

How should i get Index Order of particular Index Key.Suppose i have table 'test' and i have index key set on say 'x' column.When we create index we can create it either Acsending or Descending here i want to know where this Acsending And Descending Flag gets stored. I can get get the remaining information such as Index Name..etc from Stored Procedure 'sp_indexes_rowset' but i could not find the Order Flag in the result of this stored procedure. Can anybody help me out in this regard.
Thank You.

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-25 : 03:29:14
Try
sp_helpindex Tablename

if there is a (-) sign after index key name then its desc or else its an asc

Chirag
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-25 : 03:30:35
or have a look at the following function in Book online

indexkey_property

Chirag
Go to Top of Page
   

- Advertisement -