DDL commands are not allowed directly into a stored procedure.
You may like to use scripts instead.