Calling from SQL Statement

You can call a Java stored function from a SQL statement as shown below.

select Hello() from db_root;

select sp_int(99) from db_root;

You can use a host variable for the IN/OUT data type when you call a Java stored function/procedure as follows:

SELECT 'Hi' INTO :out_data FROM db_root;

CALL test_out(:out_data);

SELECT :out_data FROM db_root;

The first clause calls a Java stored procedure in out mode by using a parameter variable; the second is a query clause retrieving the assigned host variable out_data.