<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=SQL%2FJRT</id>
	<title>SQL/JRT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=SQL%2FJRT"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=SQL/JRT&amp;action=history"/>
	<updated>2026-05-05T23:30:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=SQL/JRT&amp;diff=4851867&amp;oldid=prev</id>
		<title>imported&gt;DannyS712 bot: Task 70: Update syntaxhighlight tags - remove use of deprecated &lt;source&gt; tags</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=SQL/JRT&amp;diff=4851867&amp;oldid=prev"/>
		<updated>2020-05-11T18:28:45Z</updated>

		<summary type="html">&lt;p&gt;Task 70: Update syntaxhighlight tags - remove use of deprecated &amp;lt;source&amp;gt; tags&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SQL/JRT&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;SQL Routines and Types for the Java Programming Language&amp;#039;&amp;#039;, is an extension to the [[SQL]] standard first published as [[International Organization for Standardization|ISO]]/IEC 9075-13:2002 (part 13 of [[SQL:1999]]). SQL/JRT specifies the ability to invoke static [[Java (programming language)|Java]] methods as routines from within SQL applications, commonly referred to as &amp;quot;Java [[stored procedure]]s&amp;quot;. SQL/JRT also calls for the ability to use Java classes as SQL [[structured user-defined type]]s. 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]].)&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
SQL/JRT allows a Java function to be called from SQL code like this:&amp;lt;ref name=&amp;quot;hsqldbmanual&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;!-- code copied from HSQLDB manual, which is BSD licensed --&amp;gt;&amp;lt;syntaxhighlight lang=sql&amp;gt;&lt;br /&gt;
CREATE FUNCTION sinh(v DOUBLE) RETURNS DOUBLE&lt;br /&gt;
  LANGUAGE JAVA DETERMINISTIC NO SQL&lt;br /&gt;
  EXTERNAL NAME &amp;#039;CLASSPATH:java.lang.Math.sinh&amp;#039;&lt;br /&gt;
&lt;br /&gt;
SELECT sinh(doublecolumn) FROM mytable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SQL/JRT also allows Java code to dynamically generate tables using a &amp;lt;code&amp;gt;java.sql.ResultSet&amp;lt;/code&amp;gt; object. The result sets returned are converted to SQL tables and can be used anywhere a table or view can be used.&amp;lt;ref name=&amp;quot;hsqldbmanual&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
{{expand section|date=November 2012}}&lt;br /&gt;
SQL/JRT stored procedures are implemented in [[HSQLDB]].&amp;lt;ref name=&amp;quot;hsqldbmanual&amp;quot;&amp;gt;[http://hsqldb.org/doc/guide/sqlroutines-chapt.html#src_jrt_routines HSQLDB manual]&amp;lt;/ref&amp;gt; Java stored procedures have also been implemented in Oracle&amp;#039;s [[JServer]] (or Aurora JVM), which was introduced in the [[Oracle Database]] version 8i in 1999;&amp;lt;ref name=&amp;quot;Lakshman2002&amp;quot;&amp;gt;{{cite book|author=Bulusu Lakshman|title=Oracle &amp;amp; Java Development|url=https://books.google.com/books?id=MsEK0HJh2VAC&amp;amp;pg=PA6|year=2002|publisher=Sams Publishing|isbn=978-0-672-32117-7|page=6}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://docs.oracle.com/cd/F49540_01/DOC/java.815/a64686/01_intr4.htm The Aurora JVM and Its Components], Oracle Corp.&amp;lt;/ref&amp;gt; it is now called [[Oracle JVM]].&amp;lt;ref name=&amp;quot;GreenwaldStackowiak2008&amp;quot;&amp;gt;{{cite book|author1=Rick Greenwald|author2=Robert Stackowiak|author3=Jonathan Stern|title=Oracle Essentials: Oracle Database 11g|url=https://archive.org/details/oracleessentials0000gree_n8w9|url-access=registration|year=2008|publisher=O&amp;#039;Reilly Media, Inc.|isbn=978-0-596-51454-9|page=[https://archive.org/details/oracleessentials0000gree_n8w9/page/323 323]}}&amp;lt;/ref&amp;gt; [[IBM DB2]] also supported Java stored procedures since about 1998, although using an external JVM (at that time).&amp;lt;ref name=&amp;quot;ChamberlinChamberlin1998&amp;quot;&amp;gt;{{cite book|author1=Don Chamberlin|title=A Complete Guide to DB2 Universal Database|url=https://books.google.com/books?id=hb4zskzHrWYC&amp;amp;pg=PA565|accessdate=16 November 2012|year=1998|publisher=Morgan Kaufmann|isbn=978-1-55860-482-7|page=565}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[SQL:2003]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.podgoretsky.com/ftp/docs/DB/SQL2003/5WD-13-JRT-2003-09.pdf SQL:2003 SQL/JRT draft]&lt;br /&gt;
*[http://farrago.sourceforge.net/design/UserDefinedTypesAndRoutines.html SQL:2003 SQL Standard User Defined Types and Routines] from the [[Farrago (software)|Farrago]] documentation&lt;br /&gt;
&lt;br /&gt;
{{SQL}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Sql Jrt}}&lt;br /&gt;
[[Category:SQL]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{database-stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;DannyS712 bot</name></author>
	</entry>
</feed>