db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r189838 - /incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita
Date Thu, 09 Jun 2005 22:21:34 GMT
Author: jta
Date: Thu Jun  9 15:21:32 2005
New Revision: 189838

URL: http://svn.apache.org/viewcvs?rev=189838&view=rev
Log:
DERBY-287: Applied Jeff Levitt's patch that clarifies IDENTITY_VAL_LOCAL documentation. 

Modified:
    incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita

Modified: incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita
URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita?rev=189838&r1=189837&r2=189838&view=diff
==============================================================================
--- incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita (original)
+++ incubator/derby/docs/trunk/src/ref/rrefidentityvallocal.dita Thu Jun  9 15:21:32 2005
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
 <!-- 
 Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.  
 
@@ -14,9 +16,6 @@
 See the License for the specific language governing permissions and  
 limitations under the License.
 -->
-
-<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
- "../dtd/reference.dtd">
 <reference id="rrefidentityvallocal" xml:lang="en-us">
 <title>IDENTITY_VAL_LOCAL</title>
 <refbody>
@@ -25,17 +24,17 @@
 <section><p></p></section>
 <section><p><b>Syntax:</b> <codeblock> IDENTITY_VAL_LOCAL (
)</codeblock></p></section>
 <section><p>The IDENTITY_VAL_LOCAL function is a non-deterministic function
-that  returns the most recently assigned value for an identity column, where
-the assignment occurred as a result of a single row INSERT statement using
-a  VALUES clause. </p></section>
+that returns the most recently assigned value of an identity column for a
+connection, where the assignment occurred as a result of a single row INSERT
+statement using a  VALUES clause. </p></section>
 <section><p>The IDENTITY_VAL_LOCAL function has no input parameters. The result
 is a DECIMAL (31,0), regardless of the actual data type of the  corresponding
 identity column.</p></section>
-<section><p>The value returned by the IDENTITY_VAL_LOCAL function is the value
-assigned to the identity column of the table identified in the most recent
-single row INSERT statement. The INSERT statement must contain a VALUES clause
-on a table containing an identity column.  The assigned value is an identity
-value generated by <ph conref="refconrefs.dita#prod/productshortname"></ph>.
+<section><p>The value returned by the IDENTITY_VAL_LOCAL function, for a connection,
+is the value assigned to the identity column of the table identified in the
+most recent single row INSERT statement. The INSERT statement must contain
+a VALUES clause on a table containing an identity column.  The assigned value
+is an identity value generated by <ph conref="refconrefs.dita#prod/productshortname"></ph>.
 The function returns a null value when a single row INSERT statement with
 a VALUES clause has not been issued for a table containing an identity column.</p></section>
 <section><p>The result of the function is not affected by the following: 
@@ -44,7 +43,10 @@
  an identity column</li>
 <li>A multiple row INSERT statement with a VALUES clause</li>
 <li>An INSERT statement with a fullselect</li>
-</ul></p></section>
+</ul></p>If a table with an identity column has an INSERT trigger defined
+that inserts into another table with another identity column, then the IDENTITY_VAL_LOCAL()
+function will return the generated value for the statement table, and not
+for the table modified by the trigger.</section>
 <section><p><b>Examples:</b></p></section>
 <example> <codeblock>ij&gt; create table t1(c1 int generated always as identity,
c2 int);
 0 rows inserted/updated/deleted
@@ -111,4 +113,3 @@
 8 rows selected         </codeblock></example>
 </refbody>
 </reference>
-



Mime
View raw message