On Wed, Nov 10, 2004 at 02:34:22PM -0500, Ernest Kim wrote:
> I was wondering if there was a way to get the value of serial data
> type after an insert.
Use currval():
http://www.postgresql.org/docs/7.4/static/functions-sequence.html
Race condtions aren't a problem:
"Notice that because this i
I was wondering if there was a way to get the value of serial data
type after an insert. For example, you have the following table:
create table my_names (
id serial unique,
name varchar(10)
);
And then you do the following:
insert into my_names values ('Ernie');
How