I have a nonclustered index over two rows in a table, and that includes a number of columns. The index is used by a view and the view has now been updated to include another column. I generally script database changes so that they test first if the change has already been applied, which obviously means e.g. a column doesn't get added multiple times accidentally if the script is re-run.
I want to add the new column to the index by dropping and recreating it (unless there is a way to include the extra column without recreating the index). But I would like to test first to see if the index contains the column. Is there a simple way to check?