Show TOC

Name of a Database Function (dbfunction_name)Locate this document in the navigation structure

Use

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.

Structure
				
<subtrans_statement>::=
  SUBTRANS BEGIN
| SUBTRANS END
| SUBTRANS ROLLBACK
			

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

Examples

SQL Tutorial, Database Functions

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).