Sunday, June 9, 2013

How to drop all columns in all databases starting with... AND how to drop the default constraint

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