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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Stored procedures, triggers, batches, and user defined functions » The structure of procedures, triggers, and user-defined functions

 

Passing parameters to functions

User-defined functions are not invoked with the CALL statement, but are used in the same manner that built-in functions are. For example, the following statement uses the FullName function to retrieve the names of employees:

 List the names of all employees
  • In Interactive SQL, type the following:

    SELECT FullName( GivenName, Surname ) AS Name
       FROM Employees;

    The following results appear:

    Name
    Fran Whitney
    Matthew Cobb
    Philip Chin
    Julie Jordan
    ...
 Notes
 See also