skip to main content
SQL Escape Sequences : User-Defined Functions
 

User-Defined Functions

OpenAccess SDK supports extension of the built-in set of scalar functions. Your IP can register information about the scalar function with the OpenAccess SDK SQL engine and implement scalar functions that take one or more arguments. This allows you to support additional functionality.
User-defined functions can be used just like the built-in functions. Each function is defined in terms of the number of arguments and the type of output.
The following example uses a varf() function to store the value of the comm field:
INSERT INTO emp (empno, ename, deptno, comm) VALUES (1,'joe', 2,
varf())