Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
» Sitemap
Free Newsletters:

By submitting your information, you agree that databasejournal.com may send you databasejournal offers via email, phone and text message, as well as email offers about other products and services that databasejournal believes may be of interest to you. databasejournal will process your information in accordance with the Quinstreet Privacy Policy.

News Via RSS Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles

Database User and Programming Tips

Posted September 4, 2018


The California Consumer Privacy Act: What You Need to Know

Line Numbers in SQL Server Management Studio

By Greg Larsen

Have ever tried to debug a chunk of TSQL code (like a stored procedure) and found yourself trying to figure out which TSQL statement is at a particular line number?  By default, SQL Server Management Studio (SSMS) doesn’t display numbers.  But that is only the default, you can change it.

To allow your Query window to display line numbers all you need to do is go to the “Tools” item on the menu and then click on the “Options…” item:


When you do that the “Options” screen will be displayed.  On this screen expand the “Text Editor” item, the “All Languages” item, then the “General” item.  Under the “Settings” item enable the line numbers, by checking the “Line numbers” item.  To save this setting click on the “OK” button.

Options Screen
Options Screen

By doing the above you will now get line numbers in all of your query windows that are open, or any  new query windows that you might open. 

See all articles by Greg Larsen

Database User and Programming Tips Archives

Comment and Contribute


(Maximum characters: 1200). You have characters left.