In SQL 2008 Management Studio, when you right click on a table in object explorer and say "Script Table as" - "Drop to " etc, the generated script used to have an IF EXISTS check before the DROP statement.
I appears that SQL 2012 Management Studio no longer has this. I did a perfunctory online search on this, as well as looked at the "Options" menu and couldn't find any thing about this feature removal.
Is it possible to get this back somehow?
It's optional now, and turned off by default.
Here's how to turn it on again: In Mgmt Studio 2012, you can find the option under Tools -> Options; select SQL Server Object Explorer -> Scripting in the left pane; set Check for object existence in the right pane to True.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With