numbers – create a DB’s sequence object without overflow error and without using cycle technique

I was wondering how will I be able to store an infinite number into a sequence Object used in DB without overflow error.

Suppose we have an array of char with length 11 named seq. We start from seq= 00,000,000,000 and each time we add one step/unit to it (seq=seq+1).

e.g. 00,000,000,000 ——- 00,000,000,001 ……. 99,999,999,999

If it reaches to 99,999,999,999 and if we increase it just one step/unit ,it will cause an overflow error! but my question here is : how to handle this problem so that we might have a sequence obj with an infinite value in it.

note 1: we don’t want to use cycle technique and start from zero again.

note 2: length of array is fixed.

Read more here: Source link