I have several database tables that a lot of redundant columns in that contain no data. Ideally I need to look at dropping these columns.
However since there are hundreds I was looking for a way to use the DROP COLUMN command from a table lookup..
So instead of:
alter table TableName
drop column Column1, Column2
Something like:
alter table TableName
drop column @ColumnName
Using the @ColumnName as a lookup from a table that holds the column names of blank columns, would a cursor work with alter/drop commands?