Hi All

After reading Amit Bansal & AmitK’s tips about SSMS, thought of sharing the tip about enabling line numbers in SSMS query window.

In a day to day life many of you face the error message like this,

1_SQL_Server_SSMS_Tips_Enabling_Line_Number_in_the_Query_Window

From the error message it clearly indicates, error at line number 28. If you enable line number for the query window you can easily go to particular line number.

For SQL Server 2008:

In the SSMS go to Tools Menu-> Options. This brings up the below Options window & Select Text Editor from the Left hand side and traverse to “Transact-SQL” then enable the Line Number option from Display section and click OK.

2_SQL_Server_SSMS_Tips_Enabling_Line_Number_in_the_Query_Window

For SQL Server 2005:

In the SSMS go to Tools Menu -> Options. This brings up the below Options window & Select Text Editor from the Left hand side and traverse to “Plain Text” then enable the Line Number option from Display section and click OK.

3_SQL_Server_SSMS_Tips_Enabling_Line_Number_in_the_Query_Window

Now you can see the line numbers in the left hand side of your query window :)

4_SQL_Server_SSMS_Tips_Enabling_Line_Number_in_the_Query_Window

Another bonus tip…

You can use Ctrl + G to go to particular line number

5_SQL_Server_SSMS_Tips_Enabling_Line_Number_in_the_Query_Window

Thanks for reading & I hope this helps!

 

Regards

Meganathan Kanagaraj

Like us on FaceBook Follow us on Twitter

Join the fastest growing SQL Server group on FaceBook