Bookmark Lines of Code in SQL Server Management Studio Query Editor Window

To navigate easier through many lines of code in SQL Server Management Studio (SSMS) Query Editor Window, it can be useful to bookmark some lines to which you would like to return to.

To set or remove a bookmark at the current line, press 'CTRL+K' followed by another 'CTRL+K'. A small blue square will appear left of the bookmarked line:


To move to the next bookmarked line of code from the current cursor location press 'CTRL+K' followed by CTRL+N, to move to the previous bookmarked line of code press 'CTRL+K' followed by 'CTRL+P'.

To clear all bookmarks press 'CTRL+K' followed by 'CTRL+L'.

By pressing 'CTRL+K' followed by 'CTRL+W', you can open a Bookmarks window:


You can move the cursor to the bookmarked line by double clicking on the bookmark in the Bookmark Window.
There is an option to rename bookmarks in the Bookmark Window.

If the post helped you, please share it:
Pin It

2 comments to Bookmark Lines of Code in SQL Server Management Studio Query Editor Window

  • Tobias


    how it's possible to save the bookmarks for another user?
    When I create a SQL-file with bookmarks, it's saved only the coding and not the bookmarks?

    • Bill

      I am also looking for a way to save bookmarks for another user, but unfortunately I don't think it can be done.
      I created a solution in SQL Server Management Studio and added a sql query file with bookmarks.
      When I open the solution in my SSMS, bookmarks are here. But when I copy the solution to another computer all the bookmarks inside the sql file are gone.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">