there is always something to develop
How to test index existance
If You want to create index unless it already exists You can use script as below:
if not exists ( SELECT i.name, o.name FROM sysindexes as i INNER JOIN sysobjects as o ON o.Id=i.Id AND i.Name='Dict_Name' WHERE o.XType='U' AND o.Name='Dict') begin print 'Creating index Dict_Name'; CREATE INDEX Dict_Name ON Dict(Name asc) end;
See also
Comments
"The greatest mistake is trying to be more agreeable than you can be."
You are 3963 reader
since 1st April 2009
Yes | 0 | |
No | 0 |