Sometimes when we encounter an error message for a T-SQL query while debugging. The SQL Server shows the error message along with the line number where the error has occurred. In this article, I will give a simple tip to enable the Line Number feature in SSMS. This feature is applicable to all versions of SSMS starting from SQL Server 2005.
Note: By Default in SSMS display line number is DISABLED.
Display Line Numbers in SQL Server Management Studio (SSMS)
- Open SSMS. Click Tools and navigate to Options (Tools -> Options).
- In the Options dialog box on the left side pane expand the Text Editor and then expand Transact-SQL.
- In General options, under Display section, Check the Check Box next to Line Numbers as shown in the above and click OK.
Thus we can display line numbers in SSMS Query Window. I assume this tip was very useful to you all. Please share your feedback in the comment section.