How can I comment my SQL Script automatically ?
One of my friend is working as SQL Developer (DBD) and 80% of the time he just create database objects and write stored procedures.
As per the company policy, every code (SQL Script), should have a standard comment like
So every time, he has to copy this code from a file and paste in new query window. It’s looks pretty easy but when you wanted to make this as a practice, you might wanted to have some sort of template so that you can avoid this step.
So here is the Trick / solution, recently shared by a great technical resource Amit. He is really a good presenter.
Modify SQLFile.sql which is located in "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql", using any editor like notepad, add your own comments what you want to see every time, when you hit a New Query button. Save this file and you are done.