troubleshooting Question

MySql auto increment

Avatar of perfectobject
perfectobject asked on
Java EEMySQL Server
5 Comments1 Solution1653 ViewsLast Modified:
hello experts,

I have a created a table with primary key as auto increment and i am accessing that table from my application using Hibernate.

For example,i have inserted 10 records from 1 to 10 as primary key(auto incremented)....if i delete any record from my application and inserts new record it is entering as 11 th record........how to make the table such that it should not break the sequence.

If i delete 5th record, the next record(6th) should occupy that place.....is it possible..!!

Thanks..!!
ASKER CERTIFIED SOLUTION
theGhost_k8
Database Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros