[Lazarus] TSQLQuery: Getting autoincremented ID value after insert (MySQL)
Marco van de Voort
marcov at stack.nl
Mon Nov 17 11:02:52 CET 2014
On Fri, Nov 14, 2014 at 09:41:27PM -0300, silvioprog wrote:
> >
> > Return the value most recently returned by nextval in the current
> > session. This function is identical to currval, except that instead of
> > taking the sequence name as an argument it fetches the value of the last
> > sequence used by nextval in the current session. It is an error to call
> > lastval if nextval has not yet been called in the current session.
>
> And PostgreSQL provides the RETURNING feature too. =)
Requires DEFAULT in the corresponding VALUES field though, I don't know
if that is cross-db.
More information about the Lazarus
mailing list