SQL/JRT

SQL/JRT, or SQL Routines and Types for the Java Programming Language, is an extension to the SQL standard first published as ISO/IEC 9075-13:2002 (part 13 of SQL:1999).

SQL/JRT specifies the ability to invoke static Java methods as routines from within SQL applications, commonly referred to as "Java stored procedures".

SQL/JRT also calls for the ability to use Java classes as SQL structured user-defined types.

SQL/JRT allows a Java function to be called from SQL code like this:[1] SQL/JRT also allows Java code to dynamically generate tables using a java.sql.ResultSet object.

[4] IBM DB2 also supported Java stored procedures since about 1998, although using an external JVM (at that time).