Welcome to MSSQL Forum!
MSSQL Forum - Discussions about Microsoft SQL Server

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

Line numbers in Management Studio

Discussion in 'General' started by Peter Schmitz, Nov 27, 2014.

  1. Peter Schmitz

    Peter Schmitz Administrator Staff Member

    Certainly one of the most useful little tricks I recently stumbled onto is enabling line numbers in SQL Server Management Studio.

    How often have you looked at an error message that mentions a line, and then had to click at random spots in your code and then checked the satatus bar (lower-right of the SSMS window) to determine what line you were on?

    I know I wasted plenty of time with that over the last few years. But no more! If you go to your menu, and select "Tools" -> "Options", you get to see the Options screen.

    There, expand "Text editor" then click on "Transact-SQL". You will find an option there called "Line numbers". Check that box!


    Your query window will now show line numbers:


Share This Page