Vlada Nesic
Valued Member
Points: 54
More actions
March 14, 2007 at 8:20 am
#116412
I want to check if table index exsist from my application in c#. If any one now how to write a tsql to do that.
Thanks
nevlad
mrpolecat
SSCertifiable
Points: 7014
March 14, 2007 at 8:30 am
#694960
select * from sysindexes where name = 'indexname'
or
select o.name,i.name from sysobjects o
join sysindexes i on i.id=o.id
where o.name = 'tablename'
March 14, 2007 at 9:03 am
#694973
Thanks!!!
Patrick Folan
Mr or Mrs. 500
Points: 512
March 15, 2007 at 6:36 am
#695195
There is also a stored procedure...
sp_helpindex tablename
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply