Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > CREATE FUNCTION >

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.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]