Often we see an error message from SQL Server which references a particular line number within our T-SQL code. It is a little frustrating to find the line number where the syntax error has occurred. In this tip we will take a look at how to quickly enable line the numbers feature in SQL Server Management Studio. Solution Let us see how to enable or disable the display of line numbers in SQL Server Management Studio’s Query Window.
1. Open SQL Server Management Studio. Click Tools -> Options from the drop down menu as shown in the below to open up Options dialog box.
2. In the Options dialog box on the left side panel expand the Text Editor option and expand Transact-SQL. Next select General.
3. In the General page’s right side panel you need to select the check box “Line numbers” under the Display section and click OK to save the changes.