• While I am sure that there are good reasons for doing so on occasions, including DDL to modify your database schema within a stored procedure is not best practice. For one reason, it stuffs up source control (you can no longer compare your source project with the target database to check for drift, for example). Wherever practically possible, I'd recommend keeping your DDL away from DML.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.