New Query Window in Microsoft SQL Server Management Studio Defaults/ Template

When you have those pesky common commands you have to use in almost all windows, you can change the default empty template like so

Open (or wherever the installation is)

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Sqlfile.SQL

And add in your defaults; my usual is:

select @@SERVERNAME, @@SERVICENAME,@@VERSION, current_user, SYSTEM_USER



Comments

Popular posts from this blog

cf_sql_timestamp vs cf_sql_date vs getdate()

Global SQL Procedure, System Objects and sp_ms_marksystemobject

Ghost Records, Card Recon and PCI Compliance