Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 76644 invoked from network); 13 Sep 2007 09:09:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Sep 2007 09:09:41 -0000 Received: (qmail 24395 invoked by uid 500); 13 Sep 2007 09:09:34 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 24371 invoked by uid 500); 13 Sep 2007 09:09:34 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 24360 invoked by uid 99); 13 Sep 2007 09:09:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 02:09:34 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-mail-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 09:11:10 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10]) by gmp-eb-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l8D999kd014159 for ; Thu, 13 Sep 2007 09:09:09 GMT Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JOA00901UF02500@fe-emea-09.sun.com> (original mail from Knut.Hatlen@Sun.COM) for derby-user@db.apache.org; Thu, 13 Sep 2007 10:09:09 +0100 (BST) Received: from localhost ([129.159.112.231]) by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JOA003Z0UR1EX80@fe-emea-09.sun.com> for derby-user@db.apache.org; Thu, 13 Sep 2007 10:09:02 +0100 (BST) Date: Thu, 13 Sep 2007 11:09:01 +0200 From: Knut Anders Hatlen Subject: Re: Questions on auto incremental column IDENTITY_VAL_LOCAL() In-reply-to: Sender: Knut.Hatlen@Sun.COM To: Derby Discussion Message-id: Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org Ivan Ooi writes: > Hi all, > > I got one question about auto incremental column and > IDENTITY_VAL_LOCAL(). > Let says, I got 3 connections doing insert at the same time on one of the > table with an auto incremental column. > Will Derby able to return correct value back to each client using > IDENTITY_VAL_LOCAL() ? Yes, Derby will return the correct value to each client. IDENTITY_VAL_LOCAL() returns the most recently generated identity value in a single-row insert on the same connection, and the return value should not be affected by concurrent activity on other connections. For details, see http://db.apache.org/derby/docs/10.3/ref/rrefidentityvallocal.html -- Knut Anders