Name of a Database Function (dbfunction_name)

A database function name (dbfunction_name) identifies a database function. Database functions are specialized database procedures. These are subprograms consisting of any number of input characters but one output parameter only. This returns the result of the function.

Syntax

<dbfunction_name> ::= [<schema_name>.]<identifier>

Neither the schema name nor the ID can be longer than 32 characters.

Explanation

You can define user-specific functions to transfer application logic to the server of the database system. You can use these database functions like the predefined functions. When naming your functions, make sure you do not use the names of predefined functions (Functions: Overview).

The database system provides a language (special SQL syntax that has been extended to include variables, control structures, and troubleshooting measures) that allows an SQL access layer to be formulated on the server side. This special SQL syntax can be used to define database functions. These database functions can then be executed as function calls of an SQL statement (database function call).

SQL Statements for creating, Calling, and Dropping a Database Procedure

CREATE FUNCTION Statement

Database Function Call (dbfunction_call)

DROP FUNCTION Statement