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

 

Granting the ability to execute a user-defined function (SQL)

Grant the ability to execute a user-defined function by granting the EXECUTE object-level privilege.

Prérequis

You must be the owner of the user-defined function, or have EXECUTE privilege with administrative rights on the function.

Ownership of a user-defined function belongs to the user who created it, and no privilege is required for that user to execute it.

Contexte et remarques

You have created a function and you want other user to be able to use it.

 Task
  1. Connect to the database.

  2. Execute a GRANT EXECUTE statement similar to the following:

    GRANT EXECUTE ON function-name TO user-id;

Résultat

The grantee can now execute the procedure.

Suivant

None.

Exemple

For example, the creator of the Nationality function could allow another user to use Nationality with the statement:

GRANT EXECUTE ON Nationality TO BobS;

 See also