20070518

SQL Server 2005 Management Studio Scripting

Something that bugs me now and then. using SQL Server 2005 Management Studio to script tables and stored procedure is really a great tool. Couldn't do without it and would certainly have to write something similar. Except now and then it throws all the object definitions into a EXEC dbo.sp_executesql @statement = N format, and that throws me off, and doesn't smell right.
Then I go scrambling, trying to figure out which of the many scripting options it is that sets this up.
For my own future sanity and for anybody who cares, it is (drum roll):

Include IF NOT EXISTS clause

Which makes sense, since then the whole definition needs to fit in an if clause.

No comments: