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.
Open the SQL editor.
More information: Entering and Executing SQL Statements
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)
SELECT hno, hotel.avgprice(zip) avgprice FROM hotel.hotel WHERE hno < 100
| HNO | AVGPRICE |
| -------- | --------------- |
| 10 | 135.00 |
| 20 | 70.00 |
| 30 | 45.00 |
...
SQL Tutorial, Database Functions