With the upcoming Minnesota SQL Saturday event, I’ve been a bit preoccupied but finally have the next post in this series ready to go.

Scripting Column

A while back when I had been originally working on this query, I had been asked about adding in a column that could be used to script out the query. The column would be able to provide a CREATE or DELETE statement with just a click of the mouse.

That’s what has been added for this update. You will find two new columns at the right edge of the column list as ddl_create and ddl_drop.

These two columns will provide a generic script that should work in many circumstances to create of drop the index on that row. Of course, use your own environment to determine names, file group, fill factor, and etc. for the indexes. And don’t just run out and start building indexes in production.