Hi all,

i have a little question on getting the last inserted value from a
table.

Lets say i have a transaction which does the following.

insert into foo values(1);
insert into bar values(2);
insert into foobar values(3);

All three tables use the same sequence to increment their id.
I want to know if it is possible to find the id of the inserted value of
foo.

Can i do a select id from foo order by id desc limit 1 before the end of
the transaction,
does this return exactly the row i inserted for this transaction?

Thanks in advance

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to