Transact-SQL Functions

SAP ASE functions are Transact-SQL routines that return information from the database or the system tables. SAP ASE provides a set of built-in functions. In addition, you can use the create function command to create Transact-SQL and SQLJ functions.

See the Reference Manual:Building Blocks for a complete list and description of the built-in functions. See the Reference Manual:Commands for information about the create function commands.

Typically, you can use functions in a select list, a where clause, and anywhere an expression is allowed.

The general syntax is:
select function_name[(arguments)]
For example, to find the identification number of the user who logs in as “emilya,” enter:
select user_id("emilya")
The server returns:
------------------
				1209