SSMS Tips and Tricks 7-1: Changing the default text in new query windows
In SSMS, when you click New Query, a new query window is opened, but because it’s blank, what might not be immediately obvious is that it’s based on a template.
The location of the template depends upon the version, but for SSMS 17.6, you’ll find it in this folder:
C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\NewFileItems\SQLFile.sql
The file is called SQLFile.sql. If it’s not in the location above, just search for SQLFile.sql.
2025-09-14