SSMS query editor adding line numbers and GOTO line number
Adding Line Numbers
In SQL Server management studio we have a provision to enable line number in the query editor.
For long scripts, it can be helpful in referring to a particular line number. It can also more useful if we are preparing a document for script instructions for others how to modify the query or trying to describe how a query will work etc.
To enable line numbers,
- Tools -> Options.
- Expand Text Editor -> Transact-SQL.
- Click on the General tab
- On the right side, select the option Line Number.
GOTO Line Number
For long scripts, we can go directly to the particular line number by using the shortcut "Ctrl + G" or on the Edit menu, "Go To -> Go To Line". By clicking, it will popup a dialog and ask for a line number. In the dialog, the max line number is shown. By clicking Ok, it takes straight to entered line number.
0 comments:
Post a Comment