User-Created Functions

Use the create function command to create and save your own scalar Transact-SQL functions.

You can include:
You cannot include :

You can include select or fetch statements that assign values only to local variables.

See the Reference Manual: Commands.

Note: You can also create Transact-SQL functions that return a value specified by a Java method. Use the create function (SQLJ) command to add a Transact-SQL wrapper to a Java method. See Java in the SAP ASE Database and the Reference Manual: Commands.