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:
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: