Skip to end of metadata
Go to start of metadata

Only in DbVisualizer Pro

This feature is only available in the Pro edition. In the Free edition, please execute the corresponding SQL in the SQL Commander.

To create a new function:

  1. Expand nodes in the tree under the connection node in the Databases tab tree until you reach the Functions node,
  2. Select the Functions node and open the Create Function dialog from the right-click menu.

The details of the dialog depends on the database, but typically you need to:

  1. Enter an object name,
  2. Click the Add button in the Parameters area to add parameters,
  3. Enter a name and data type for each parameter. For some databases you can also enter a direction (typically IN, OUT, or INOUT) and a default value.

You can use the other buttons to the right of the parameter list to remove and move a parameter.

The dialog uses this information together with a simple sample body to compose a CREATE statement. For most databases, you can not enter the real code in the dialog. The real code is often complex and large, so DbVisualizer provides a more powerful editing environment than would fit in a dialog via the Code Editor. What you create with the dialog should be seen as a template that you then complete and work with in the Code Editor.

For some databases the sample code is editable because there is no way to write a generic sample that compiles. You must then modify the template to something that is syntactically correct, but we still recommend that you finish the real code in the Code Editor instead.

Click Execute in the dialog to create the new function.

  • No labels