> I'm wondering how people creates guaranteed sequential numbers - in my case 
> for invoice numbers.
> 
> - Sequences are not rollback'able.
> - It seems overkill to have a table just for this.
> - What else?

You'll probably need a table (although you may be able to get away with
only one for all of these you want to do).  The big issue here is locking
since a second transaction looking to get a number needs to wait for 
an earlier transaction that has already gotten a number to either commit
or rollback to reuse the number if necessary.

Reply via email to