Procedure documentationUsing Database Functions Locate this document in the navigation structure

Prerequisites

  • You are logged on to the database as a database user.

  • You own the database function.

  • You have the EXECUTE privilege for executing the database function and assigning this authorization to other users.

    More information: SQL Reference Manual, Privileges: Overview

  • The database is in the ONLINE operational state.

Procedure

  1. Open the SQL editor.

    More information: Entering and Executing SQL Statements

  2. Call up the user-defined function in the same way as you would call up a predefined function.

    More information: SQL Reference Manual, Database Function Call (dbfunction_call)

Example

SELECT hno, hotel.avgprice(zip) avgprice FROM hotel.hotel WHERE hno < 100

| HNO | AVGPRICE |

| -------- | --------------- |

| 10 | 135.00 |

| 20 | 70.00 |

| 30 | 45.00 |

...

More Information

SQL Tutorial, Database Functions