Is it possible to change the default templates in SQL Server Management Studio? For example, when I right-click on a table and I choose "Script Table as" from the context menu, I can choose select, insert, update, etc. I would like to change the format of some of these sql scripts like you can with the templates in the template explorer.
+2
A:
'Tis possible only in Tools -> Options -> SQL Server Object Explorer -> Scripting
silent
2009-11-05 16:13:22
I was hoping for a way to modify the format in other ways such as indentation.
Daniel
2009-11-06 13:19:40
I think it is not possible to change something else.
silent
2009-11-06 13:23:43
A:
If you are looking to do DROP and CREATE statements in the same script, or otherwise generate scripts for SQL Server 2005 that are more compatible with SQL Server 2000 scripts, you mey want to check out the Scriptio tool:
RMorrisey
2009-11-05 23:09:30
A:
For more control than tools -> options, apparently there are bunch of templates that you can change in the application directory (i.e. : C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql
), however I couldn't find the ones for basic DML (INSERT, UPDATE etc).
Maybe just the ones for creating new objects are available.
Serkan
2009-12-21 14:18:24
These templates are exactly the kind of thing I want to have access to. However, these are the templates used by the template explorer and don't include the basic SELECT, INSERT, UPDATE, etc. templates.
Daniel
2009-12-22 17:52:46