Maintain a table containing database names and column names that you want to delete.
Loop this table using Cursor and create dynamic ALTER TABLE string query(as you are doing).
Finally use EXEC command to execute the dynamic strings one by one.
Regards, RSingh
No comments:
Post a Comment