Hi,
I'm coming over from the MS sql server world and I've been reading up on
sequences. I have a question:
I see that you can create an implicit sequence like this:
CREATE TABLE test (field varchar(5), id serial NOT NULL, PRIMARY KEY (id));
And I've read that you can replace the Microsoft @@Identity by using this:
select last_value from test_id_seq;
But what if somebody else inserts a row after your insert but before your
select? Will you end up with their ID or is the "last_value" somehow
associated with the connection?
Thanks,
Kevin