Change the default template in SQL Server Management Studio

Can I change the default templates in SQL Server Management Studio? For example, when I right-click on a table and I select "Script Table as" from the context menu, I can select select, insert, update, etc. I would like to change the format of some of these sql scripts as you can using templates in the template explorer.

+3
source share
4 answers

'Only possible in Tools -> Options -> SQL Server Object Explorer -> Scripting

+3
source

, → , , , (.. C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql), DML (INSERT, UPDATE ..)).

, , .

+2

, ( ), , - :

View -> Template Explorer (Ctrl + Alt + T SQL Server 2012) , SQL ( ). , Windows. , , (, <Procedure_Name, sysname, ProcedureName>).

, New → Stored Procedure, , , , , ( , ).

+2

If you are looking for 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 want to check out the Scriptio tool:

http://www.codeplex.com/scriptio/

0
source

Source: https://habr.com/ru/post/1722006/


All Articles