Wednesday, April 27, 2005

HOWTO: Clean out SQL Server Index Wizard hypothetical indexes

SELECT 'DROP INDEX ' + object_name(id) + '.' + name AS Hypothetical FROM sysindexes
WHERE indexproperty(id, name, 'IsHypothetical') = 1

No comments: