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
 Transact-SQL (2000)
 All Index names

Author  Topic 

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-05-03 : 02:42:32

What is the query that list out all the index names used in the tables?

Madhivanan


Madhivanan

Failing to plan is Planning to fail

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-05-03 : 08:18:12
[code]
select o.name as table_name, i.name as index_name, i.indid,
case
when indid = 1 then 'CI'
when indid > 1 and indid <> 255 then 'NCI'
when indid = 255 then 'text or image'
else 'i have no idea'
end
from sysindexes i
join sysobjects o on i.id = o.id
[/code]

Go with the flow & have fun! Else fight the flow
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-05-03 : 08:48:47
Thanks spirit1
I tried this but couldnot give the same

select *
from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -