Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Stored procedures, triggers, batches, and user-defined functions


User-defined functions

User-defined functions are a class of procedures that return a single value to the calling environment.


SQL Anywhere does not make any assumptions about whether user-defined functions are thread-safe. This is the responsibility of the application developer.

The CREATE FUNCTION syntax differs slightly from that of the CREATE PROCEDURE statement.

  • No IN, OUT, or INOUT keywords are required, as all parameters are IN parameters.

  • The RETURNS clause is required to specify the data type being returned.

  • The RETURN statement is required to specify the value being returned.

  • Named parameters are not supported.

Creating a user-defined function
Calling a user-defined function
Dropping a user-defined function (SQL)
Granting the ability to execute a user-defined function (SQL)
Advanced information about user-defined functions