SQLite Forum

NEXT VALUE FOR in SQLite
Login
If not exists I have to add some min value, but that can be done in advance.
In most cases I have to get a unique range of numbers for the counter (account). I can advance the counter value for the number items in the range and self generate numbers. The only issue if some values in the range jumps over the max range value and will not proper cycled. Don't think a single statement can accommodate such logic. But approach is very nice.

All threads using their own connection with FullMutex flag.