But for minimal app code change I'd suggest a using a PL/SQL trigger
that implements the auto increment functionality and saves the last
value into a per-session package variable.
If you, or anyone, does the latter then I'd be very interested in
having a copy as I'll need to do
All,
Using a sequence and trigger as discussed will allow the following
to work :
INSERT INTOtab (value) VALUES ('foo');
SELECT MAX(id) FROM tab;
as long as these two statements are within the same transaction
block.
I do however like the Oracle 8 returning clause a
I apologize if it doesn't mean
much to you.
Hope this helps,
Steve
-Original Message-
From: Jim Spath [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 09, 2001 5:22 AM
To: Gregory; [EMAIL PROTECTED]
Subject: Re: How can I get insert_id from DBD::Oracle?
There is no DBD::Oracle
I'm migrating from MySQL to Oracle. When I'm executing INSERT... with DBD::mysql I
could get the id of inserted row with DBH-{mysql_insertid}. Is there any way to do
the same thing with Oracle (DBD::Oracle)?
Thanks. Grisha.
PROTECTED]
Subject: How can I get insert_id from DBD::Oracle?
I'm migrating from MySQL to Oracle. When I'm executing INSERT... with
DBD::mysql I could get the id of inserted row with DBH-{mysql_insertid}.
Is there any way to do the same thing with Oracle (DBD::Oracle)?
Thanks. Grisha.
Yes there is one, as a matter effect mysql prides itself on that one.
Ilya Sterin
-Original Message-
From: Kokarski, Anton
To: 'Gregory'; [EMAIL PROTECTED]
Sent: 6/8/01 1:24 PM
Subject: RE: How can I get insert_id from DBD::Oracle?
Greg,
Look around on mysql.com I've seen
On Fri, Jun 08, 2001 at 12:24:33PM -0700, Kokarski, Anton wrote:
Greg,
Look around on mysql.com I've seen a mentioning of the utility that allows
you to port MySQL to oracle. I think it comes from Oracle.
And is a mostly hopeless marketing tick box gimmick.
I'm migrating from MySQL to
On Fri, Jun 08, 2001 at 11:23:07PM +0100, Tim Bunce wrote:
For maximum perfomance I'd suggest selecting from an Oracle 'sequence'
before you do the insert.
Done that plenty of times...
But for minimal app code change I'd suggest a using a PL/SQL trigger
that implements the auto increment