Re: How to get the generated key from insert with Oracle

2008-05-09 Thread Sundar Sankar
equence.nextval. > > Thanks, > Chris > > -Original Message- > From: Clinton Begin [mailto:[EMAIL PROTECTED] > Sent: Friday, May 09, 2008 9:43 AM > To: user-java@ibatis.apache.org > Subject: Re: How to get the generated key from insert with Oracle > > Easy enou

RE: How to get the generated key from insert with Oracle

2008-05-09 Thread Chris O'Connell
ECTED] Sent: Friday, May 09, 2008 9:43 AM To: user-java@ibatis.apache.org Subject: Re: How to get the generated key from insert with Oracle Easy enough to test... open two sqlplus sessions and step through an example... Clinton On Fri, May 9, 2008 at 8:12 AM, Chris O'Connell <[EM

Re: How to get the generated key from insert with Oracle

2008-05-09 Thread Larry Meadors
On Fri, May 9, 2008 at 8:12 AM, Chris O'Connell <[EMAIL PROTECTED]> wrote: > Thanks. I had never heard this before. Just to make sure we are talking > about the same thing, I'm not concerned about the sequence returning the > same value to two different people when the trigger is calling 'nextval

Re: How to get the generated key from insert with Oracle

2008-05-09 Thread Clinton Begin
gt; > Thanks, > Chris > > -Original Message- > From: Larry Meadors [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 08, 2008 5:38 PM > To: user-java@ibatis.apache.org > Subject: Re: How to get the generated key from insert with Oracle > > Not with a sequence, I&

RE: How to get the generated key from insert with Oracle

2008-05-09 Thread Chris O'Connell
knew, so I'm trying to get a full understanding of what is going on. Thanks, Chris -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2008 5:38 PM To: user-java@ibatis.apache.org Subject: Re: How to get the generated key from insert with Oracle Not

Re: How to get the generated key from insert with Oracle

2008-05-08 Thread Larry Meadors
ansaction, don't I still have > concurrency issues with this approach? > > > > -Original Message- > From: Larry Meadors [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 08, 2008 5:12 PM > To: user-java@ibatis.apache.org > Subject: Re: How to get the generat

RE: How to get the generated key from insert with Oracle

2008-05-08 Thread Chris O'Connell
Even if I am executing all of this inside a transaction, don't I still have concurrency issues with this approach? -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2008 5:12 PM To: user-java@ibatis.apache.org Subject: Re: How to get the gene

Re: How to get the generated key from insert with Oracle

2008-05-08 Thread Larry Meadors
I think this would be the preferred SQL for that: select ids.currval from dual ...where ids is your sequence's name. Larry

How to get the generated key from insert with Oracle

2008-05-08 Thread Chris O'Connell
So, I need to insert a User record. I cannot change the database tables, so I am stuck with the current behavior of my database. On insert, there is a trigger that selects a value from a SEQUENCE and updates the key with that value. I would like to return that value from the insert statement to