> 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.
- Re: [SQL] Invoice number Volker Paul
- Re: [SQL] Invoice number Mike Castle
- Re: [SQL] Invoice number John Hasler
- Re: [SQL] Invoice number Oliver Elphick
- Re: [SQL] Invoice number Mike Castle
- Re: [SQL] Invoice number Kaare Rasmussen
- Re: [SQL] Invoice number John Hasler
- Re: [SQL] Invoice number George Moga
- Re: [SQL] Invoice number D'Arcy J.M. Cain
- Re: [SQL] Invoice number Josh Berkus
- [SQL] Optimization recommendations request Stephan Szabo
- [SQL] Optimization recommendations request Joe Conway
- Re: [SQL] Optimization recommendations request Stephan Szabo
- Re: [SQL] Optimization recommendations request Tom Lane