Calling a UDF

From InterBase
Jump to: navigation, search

Go Up to Working with UDFs and Blob Filters


After a UDF is created and declared to a database, it can be used in SQL statements wherever a built-in function is permitted. To use a UDF, insert its name in a SQL statement at an appropriate location, and enclose its input arguments in parentheses.

For example, the following DELETE statement calls the ABS() UDF as part of a search condition that restricts which rows are deleted:

DELETE FROM CITIES
WHERE ABS (POPULATION - 100000) > 50000;

UDFs can also be called in stored procedures and triggers. For more information, see “Working with Stored Procedures” and “Working with Triggers” in the Data Definition Guide.

Topics