Subject Generator
Author Olaf Kluge

I need the last ID from a table. Now I can get this with select max(id) from
table into :maxlnr. I thought, it is a better way to read the last
generator-id with maxlnr = gen_id(gen_t_dt_id,0); This results a not indexed
read of my table.

Now I have read the following in firebird faqs: Unless you know very well
what you are doing, using GEN_ID() with step values lower than 1 may
compromise your data's integrity.

What is the best way to get the last value?

Best thanks and regards.


[Non-text portions of this message have been removed]