Display Line Numbers in SQL Server Management Studio Query Editor Window

By default, line numbers are not shown in SQL Server Management Studio (SSMS) Query Editor Window next to the T-SQL code:

ssms_no_displayed_line_numbers

To enable or disable the display of line numbers next to the T-SQL code in Query Editor Window, go to:

Tools -> Options:

ssms_tools_options

Expand 'Text Editor' -> expand 'Transact-SQL' -> Click 'General' -> Select the 'Line numbers' check box:

ssms_option_display_line_numbers

Line numbers will be displayed next to the T-SQL code in all new Query Editor Windows in SQL Server Management Studio:

ssms_displayed_line_numbers