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

 

Creating a user-defined function

You can create user-defined functions from Sybase Central. User-defined functions are a class of procedures that return a single value to the calling environment.

Prérequis

You must have the CREATE PROCEDURE system privilege to create functions owned by you. You must have the CREATE ANY PROCEDURE or CREATE ANY OBJECT system privilege to create functions owned by others.

You must have the CREATE EXTERNAL REFERENCE system privilege to create an external function.

No privilege is required to create temporary functions.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. In the left pane, right-click Procedures & Functions and click New » Function.

  3. Follow the instructions in the Create Function Wizard.

  4. In the right pane, click the SQL tab to finish writing the function code.

Résultat

The new function appears in Procedures & Functions.

 See also