SSMS Tips and Tricks

Productivity Driven Development

Change the Default Text in the New Query Window

| Comments

Do you always like to insert some default text in a new query (like author comments, or transactions). You can change the file at C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql\SQLFile.sql to do this.

For example, if I put the following text in there:

/*
Author: <Author, SYSNAME, Author_Name`>
Last Edited: <LastEdited, SYSNAME, LastEdited>
*/

Then I get the below on opening a new query window:

If I press Ctrl + Shift + M, I can insert values for the parameters:

You can also change the default text for triggers, stored procedures and so on if you look at files inside different sub-folders in that folder.

Want to learn more about SSMS? Check out this Pluralsight course.
Use SqlSmash to write maintainable SQL scripts, understand code faster and navigate around easily in SSMS.

Comments