Re: Maybe There is a Problem about auto_increment_increment
> create table test(id int not null primary key auto_increment unique)
Primary keys are by definition unique. Lose the redundant "unique" from that cmd.
Auto_increment guarantees uniqueness, not exact sequentiality. If you want the latter, follow the standard practice of preparing a table of desired values, use it to pluck keys when needed.
Subject
Written By
Posted
February 18, 2021 06:46AM
Re: Maybe There is a Problem about auto_increment_increment
February 18, 2021 10:20AM
February 19, 2021 12:23AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.