Subject | Re: [firebird-support] Generators |
---|---|
Author | Lester Caine |
Post date | 2003-10-12T05:44:41Z |
> 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 "selectFor the same reason as above. Two people add a record, both
> max(...) + 1 from..."... i know it's not a good idea for eficiency... but it
> works, not?
get the same number, and if the field is 'UNIQUE' then one
commit will fail.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services