简体   繁体   中英

IN SSMS how do I script a stored proc with a Drop Section and a Create Section?

For our deployments, I just want to drop the existing stored proc, then re-create in the same script. The script wizard only seeems to give me a mutually exclusive option - I'm looking for a Drop-Then Create Option. Am I missing something?

script wizard http://img37.imageshack.us/img37/7167/scriptwizard.png

Its a bug . It appears to be fixed after I installed SQL Server SP1. Appears they have just added a single drop down called script drops - which makes a heck of a lot more sense than an option to "only script drops".

Wizards are just a helper and sometimes don't give you options for all the possibilities. You could use the wizard to create both scripts and then copy paste them together.

get some tool like sqlbelt or somthing like this to do both create and drop in one script. or use sql2000 for this that will give option like this from that you can create both drop and create in one step.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM