SQLJ stored procedures

Using Java-SQL capabilities, you can install Java classes in the database and then invoke those methods from a client or from within the SQL system. You can also invoke Java static (class) methods in another way—as SQLJ stored procedures.

SQLJ stored procedures:

The end user need not know whether the procedure being called is a SQLJ stored procedure or a Transact-SQL stored procedure. They are both invoked in the same way.

The SQLJ syntax for create procedure is:

create procedure [owner.]sql_procedure_name
	([[ in | out | inout ] sql_parameter_name 
		sql_datatype [( length) | 
		(precision[, scale])]
	[, [ in | out | inout ] sql_parameter_name 
		sql_datatype [( length) | 
		(precision[, scale]) ]]
	[modifies sql data] 
	[dynamic result sets integer] 
	[deterministic | not deterministic] 
	language java 
	parameter style java
	external name 'java_method_name 
		[([java_datatype[, java_datatype 

NoteTo comply with the ANSI standard, the SQLJ create procedure command syntax is different from syntax used to create Sybase Transact-SQL stored procedures.

Refer to the Reference Manual for a detailed description of each keyword and option in this command.

When creating SQLJ stored procedures: