• bitbucket-25253 (2/20/2013)


    You may want to look at the procedure (in the Master DB) titled

    [sys].[sp_MSforeachtable].

    Review the T-SQL to determine if it will perform as you want it to, or if it does not prehaps a simple modification will suffice.

    Oh, that's awesome. Thanks. Based on your experience, if it runs into a table that doesn't have the column I'm trying to get rid of, will it stop and throw an error, or continue the loop?

    exec sp_msforeachtable

    'alter table ''?'' drop column Active'

    I'm reading up on the @commandorder parameters now.