We can enable line numbers to be displayed in SQL Server Query Editor Window. It is very helpful when writing large queries or stored procedures.
By default line numbers are disabled in Query editor window, to enable it there are few steps as given below.
Step 1> Go to header menu > Click on Tools tab > Options..
Step 2> On Options window > Navigate to Text Editor > Transact-SQL > General >Tick ‘Line Number’.
Step 3> Finally click on ‘OK‘ button.
Now, when a query editor window is opened Line Numbers will be displayed as shown below.