Types of UDRs

You can write the following types of C UDRs.
Type of UDR Description C implementation
User-defined function Returns one or more values and therefore can be used in SQL expressions
For example, the following query returns the results of a UDR named area() as part of the query results:
SELECT diameter, area(diameter)
       FROM shapes 
       WHERE diameter > 6;
A C function that returns some data type other than void (usually a DataBlade® API data type)
User-defined procedure Does not return any values and cannot be used in SQL expressions because it does not return a value
You can call a user-defined procedure directly, however, as the following example shows:
EXECUTE PROCEDURE myproc(1, 5);
A C function that returns void