Skip to content
The latest version of DbVisualizer was released 2024-07-04DOWNLOAD HERE ->

Creating a Trigger

Only in DbVisualizer Pro

This feature is only available in the DbVisualizer Pro edition.

The Create Trigger dialog helps you create a trigger for a table.

Opening the Create Trigger Dialog

To create a trigger for a table:

  1. Locate the table in the Databases tab tree,
  2. Select the table node and open the Create Trigger dialog from the right-click menu, Screenshot of the Create Trigger dialog
  3. Enter the required info in the fields, e.g. trigger name. The fields are database dependent so the figure is just an example,
  4. The Source area contains stub code that you can later edit in the Trigger Editor. For most databases you can leave it as is, but for some databases, you must adjust the stub code to match your database objects.
  5. Click the Execute button to create the trigger

Trigger Editor

To edit the trigger code:

  1. Expand the Trigger node for the table in the Databases tab tree,
  2. Double-click the trigger node to open its Object View tab,
  3. Open the Trigger Editor tab and edit the code in the editor,
  4. Click the Save toolbar button to save (and for some databases, compile) the trigger.

If the database reports any errors, the location of the errors are highlighted with curly red underlines in the editor for most databases. Hovering the mouse over such an underline shows the error message.

The Log tab in the results area also lists all errors. Clicking on the icon next to an error message selects the corresponding line and positions the caret at the error location, if the database reports error locations.