top of page

New Query - Changing the Default SQL query in SSMS

There are times where I like to have a default query ready when I create a new query in SSMS (SQL Server Management Studio).

Doing so in pre Management Studio 18 is found by updating a SQLFile.sql in one of these locations (depending on your version):

C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql

"110" denoting the version of SSMS you are using.

Well just for kicks Microsoft (assume it's actually because of the naming conventions) have changed the default location when you install SSMS 18. The new location is found here:

C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\SqlWorkbenchProjectItems\Sql

Once you update the .sql file found here, any time you click new query in SSMS, your default will now be whatever you have typed here.

Hope that helps someone, as I was struggling for a bit without this handy update.

13 views0 comments

Recent Posts

See All


bottom of page