Hi Everyone,
I am trying to generate id numbers using sequence for an existing database.
The problem is that the data currently in the database does not follow any order and the numbers are pretty random. The highest ID in the table is 2345 - this does not mean that every number from 1 - 2345 has been used. If I use a sequence (with a trigger), will the use of all the unused numbers be lost? Could it create possible problems in the future? If I delete an ID, it wouldn't affect the next generated number? If I turn off the trigger and then turn it on later, will the next generated number always be the next number of the last number generated?
Please let me know if my question isn't clear enough and I will try to explain better.
Thank you!
I am trying to generate id numbers using sequence for an existing database.
The problem is that the data currently in the database does not follow any order and the numbers are pretty random. The highest ID in the table is 2345 - this does not mean that every number from 1 - 2345 has been used. If I use a sequence (with a trigger), will the use of all the unused numbers be lost? Could it create possible problems in the future? If I delete an ID, it wouldn't affect the next generated number? If I turn off the trigger and then turn it on later, will the next generated number always be the next number of the last number generated?
Please let me know if my question isn't clear enough and I will try to explain better.
Thank you!