Watcom-SQL and Transact-SQL are SQL dialects supported by SQL Anywhere, and can be used when creating user-defined functions.
-
In Sybase Central, connect to the database as a user with
DBA or Resource authority.
-
-
In the left pane, right-click Procedures &
Functions and select New > Function.
-
Enter a name for the function
and select the user who will own the function.
-
Select the SQL dialect or language for the function.
Click Next.
-
Select the type of value to be returned in the
function, and specify the size, units, and scale for the value.
-
Type a name for the return value and click Next.
-
Add a comment describing the purpose of the new
function. Click Finish.
-
In the right pane, click the SQL tab to complete
the procedure code.