[thelist] Free Tip about SQL

Plunkett, Matt MPlunkett at MSA.com
Fri Jul 18 11:22:29 CDT 2003

-----Original Message-----
From: Rob Smith
Sent: Friday, July 18, 2003 11:54 AM
To: Thelist (E-mail)
Subject: [thelist] Free Tip about SQL

>A colleague of mine came up to me and asked:
"Is there a way, in a SQL statement, to return the auto generated ID of a
record when it's created by an insert values query? ..."

In PL/SQL, you can just do INSERT(..)VALUES(...)RETURNING idcol INTO
varname.  I would imagine most languages have a built in technique for doing

More information about the thelist mailing list