If you have ever worked with me on Comprehensive Database Performance Health Check, you might be familiar that I work with my clients via online meetings. During an online meeting, my clients share the screen with me and during that time I often request changes in the T-SQL scripts. The biggest challenge which we face is that when I ask something to be changed it is not easily understood by the client. This is when the line numbers in SSMS comes in extremely handy and let us learn in today’s blog post how we can do that.
Here is how you can enable line numbers in SSMS.
SSMS Menu Bar >> Tools >> Options >> Text Editor >> Transact-SQL >> General >> Area Settings.
Over here click on the checkbox which is next to Line Numbers and it will start showing the line numbers in SSMS. Personally, I find this feature very convenient and often helps me to remember the changes performed in my queries easily.
Here is the link to my YouTube Channel. If you like what you see, you should subscribe to the channel. If you have any idea on which you want me to create a video, do let me know and I will be happy to create a video on that topic.
Reference: Pinal Dave (https://blog.sqlauthority.com)
I got started in computing long enough ago that line numbers where part of the line (10 LET H$ = “HELLO”) or were punched in columns 73-80 of the cards. It was frustrating to me that early versions of SQL Server’s query tools did not provide a way to show or go to specific lines by their number.
When I finally found out that SSMS could give me line numbers, it quickly became my habit to turn on line numbers as one of my last installation steps. The column on the screen also provides a slightly wider space for your mouse pointer to select a line or group of lines.