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:
|
A C function that returns some data type other than void (usually a 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: |
A C function that returns void |