Example of Registering a UDR Written in the Java Language
The following CREATE FUNCTION statement registers the user-defined
function, sql_explosive_reaction( ). This function is discussed
in sqlj.install_jar.
CREATE FUNCTION sql_explosive_reaction(INT) RETURNS INT WITH (class="jvp") EXTERNAL NAME "course_jar:Chemistry.explosiveReaction" LANGUAGE JAVA;
This function returns a single INTEGER value. The EXTERNAL NAME clause specifies that the Java™ implementation of the sql_explosive_reaction( ) function is a method called explosiveReaction( ), which resides in the Chemistry Java class that resides in the course_jar JAR file.