Home Forums Article Discussions Article Discussions by Author Discuss content posted by Lowell Script all indexes as CREATE INDEX statements RE: Script all indexes as CREATE INDEX statements
craigborri
Valued Member
Points: 66
More actions
April 22, 2011 at 12:07 pm
#1314973
I'd suggest changing the order by on the last select to
order by ISCLUSTERED desc, tablename, indexid, indexname
This will insure the clustered indexes are created first, which you'll want to do if you ever run this for real.