kamiseq <kamiseq@gmail.com> writes:
> select into _id lastval();
> and is that safe operation, can I rely on lastval() that it will
> return value of id that was inserted before?
You want to use currval() with the sequence name.
> can it happened that other user will insert something between my
> insert and select?
currval() specifically written to be safe in this case.
-Doug