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