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 2008 Forums
 Transact-SQL (2008)
 How to know if index exists before creating it

Author  Topic 

abenitez77
Yak Posting Veteran

53 Posts

Posted - 2011-10-27 : 20:45:27
How do i find out if an index exists before I create it in a script? I have been using SELECT * FROM INFORMATION_SCHEMA.tables and SELECT * FROM INFORMATION_SCHEMA.columns to see if a table exists or column exists before creating it.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-10-27 : 21:14:41
query sys.sysindexes


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -