Subject Re: [firebird-support] Generators
Author Lester Caine
> Doesn't have to be a 1 instead of a 4?

Definitely not! Fine if you are the only user, but what if
someone else is also accessing the generator. You don't know
where to go. That is WHY the generator is outside transactions.

> I'm thinking about producing the unique value for a primary key with "select
> max(...) + 1 from..."... i know it's not a good idea for eficiency... but it
> works, not?

For the same reason as above. Two people add a record, both
get the same number, and if the field is 'UNIQUE' then one
commit will fail.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services