I am doing a project using oracle10g XE and JSP.
Here i am using a table where data type of a field is autonumber.
It is working fine when i insert or update record. but it does not continue its sequence when i delete a record.

For example i have inserted 3 rows where 'id' is autonumber field then it will have 1,2,3 as its values. But if i delete the 3rd record then the next inserted value will be 5 ie, 1,2,3,5.. I want it to continue its sequence even if i delete any record.. What can i do to do that.?
Is there any solution for this.?

This is correct procedure. Can you imagine how much time would by consumed in either searching for empty position or moving data up to fill empty position in database with millions of records?

Thank u for the suggestion.. i have left it like that.. i had thought there must be some solution..

what about using maxvalue +1 for the next number.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.