Subject RE: [firebird-support] Getting the last inserted row ID
Author Helen Borrie
At 02:20 PM 30/09/2004 +1000, you wrote:
> > >
> > >select max(id) from table;
> > >
> > >Is it much more inefficient? My app is a not inserting more than 10
> > >rows at a time. It is an interactive application with only one user.
> >
> > It is valid ONLY if that user has exclusive access to the
> > database. It is
> > not a question of efficiency, it is a question of data integrity in a
> > system that is designed to be used concurrently by more than one user.
> >
> > ./heLen
>
>surely it falls outside the "efficient" category as well?
>Alan

Yup. cf Select max() on an ascending index...vs Select a kick from a generator

./h