10. Working with bookmarks

10.1. Defining bookmarks
10.2. Jumping to a bookmark
10.3. Configuring the display of the bookmark list

10.1. Defining bookmarks

A bookmark inside the editor is defined by adding the keyword @WbTag followed by the name of the bookmark into a SQL comment:

-- @WbTag delete everything
truncate table orders,order_line,customers;
commit;
    

The keyword is not case sensitive, @wbtag will work just as wel as @WBTAG, or @WbTag. A multiline comment can be used as well as a single line comment.

The annotations for naming a result can additionally be included in the bookmark list. This is enabled in the options panel for the editor.

The names of procedures and functions can also be used as bookmarks if enabled in the bookmark options

10.2. Jumping to a bookmark

To jump to a bookmark select ToolsBookmarks. A dialog box with all defined bookmarks will be displayed. You can filter the list of displayed bookmarks by entering a value in the input field. Depending on the option Filter on name only the value will either be compared only against the bookmark name. If that option is disabled then the bookmark name and the name of the SQL tab will be checked for the entered value.

[Note]

The selection in the bookmark list can be moved with the UP/DOWN keys even when the cursor is located in the filter input field.

If the option Only for current tab is enabled, then the dialog will open showing only bookmarks for the current tab.

10.3. Configuring the display of the bookmark list

There are two options to influence how the list of bookmarks is displayed. Both options are available when displaying the context menu for the list header (usually through a click with the right mouse button):

  • Remember column widths - if this is enabled, the columns are not automatically adjusted to the width of the content. Instead the list remembers whatever width was adjusted.
  • Remember sort order - by default the list is sorted by the name of the bookmark. When this option is selected, whatever sort order is selected (by clicking on the column headers) will be saved and restored the next time the dialog is opened.