Using sequence in MySQL and Hibernate
问题 I'm working on a project that uses Hibernate and MySQL. I intend to use sequence to generate ID for all tables in database. (It's hard to describe my question, so I will show you as an example). For example: I have 2 tables A & B. Firstly, I insert 10 records to table A, and their IDs will be 1 to 10 . Then, I insert 10 records to table B, and I want their IDs will be 11-20 , not 1-10. It means the generated ID value will be counted by all records in all tables in databases, not in a single