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. The two parts of the extension originate from the earlier ANSI SQLJ part 1 and 2 standards (not to be confused with SQLJ part 0, which defined an embedding of SQL into Java, later standardized by ISO as SQL/OLB.)


SQL/JRT allows a Java function to be called from SQL code like this:[1]

  EXTERNAL NAME 'CLASSPATH:java.lang.Math.sinh'

SELECT sinh(doublecolumn) FROM mytable

SQL/JRT also allows Java code to dynamically generate tables using a java.sql.ResultSet object. The result sets returned are converted to SQL tables and can be used anywhere a table or view can be used.[1]


SQL/JRT stored procedures are implemented in HSQLDB.[1] Java stored procedures have also been implemented in Oracle's JServer (or Aurora JVM), which was introduced in the Oracle Database version 8i in 1999;[2][3] it is now called Oracle JVM.[4]IBM DB2 also supported Java stored procedures since about 1998, although using an external JVM (at that time).[5]

See also


  1. ^ a b c HSQLDB manual
  2. ^ Bulusu Lakshman (2002). Oracle & Java Development. Sams Publishing. p. 6. ISBN 978-0-672-32117-7.
  3. ^ The Aurora JVM and Its Components, Oracle Corp.
  4. ^ Rick Greenwald; Robert Stackowiak; Jonathan Stern (2008). Oracle Essentials: Oracle Database 11g. O'Reilly Media, Inc. p. 323. ISBN 978-0-596-51454-9.
  5. ^ Don Chamberlin (1998). A Complete Guide to DB2 Universal Database. Morgan Kaufmann. p. 565. ISBN 978-1-55860-482-7. Retrieved 2012.

External links

  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.



Connect with defaultLogic
What We've Done
Led Digital Marketing Efforts of Top 500 e-Retailers.
Worked with Top Brands at Leading Agencies.
Successfully Managed Over $50 million in Digital Ad Spend.
Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.
Taught Advanced Internet Marketing Strategies at the graduate level.

Manage research, learning and skills at defaultlogic.com. Create an account using LinkedIn to manage and organize your omni-channel knowledge. defaultlogic.com is like a shopping cart for information -- helping you to save, discuss and share.

  Contact Us