Go To Line Number in SQL Server Management Studio Query Editor Window

If you didn't enable the option to Display Line Numbers in SQL Server Management Studio Query Editor Window, and you want to quickly go to a specific line number:

Click 'Edit' -> 'Go To':

ssms_edit_go_to

or press 'CTRL + G' to open 'Go To Line' dialog box:

ssms_go_to_line_dialog_box

Enter the number of the line that you want to go to, and click 'OK'.

If you want to quickly go to the line in the code where you have a syntax error, double click the red error message and SQL Server Management Studio (SSMS) will take you directly to the line of the code stated in the error message:

ssms_double_click_on_error_message

If the post helped you, please share it:
Pin It

1 comment to Go To Line Number in SQL Server Management Studio Query Editor Window

  • Server Management

    To enable line number follow below steps.

    1: Go to Tools > Options.
    2: In the Options dialog box navigate to Text Editor > Transact-SQL > General.
    3: Check “Line Numbers” and click on “OK” Now, when a query window is opened Line Numbers will be displayed: Hope This Helps!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">