I have been using AUTO_INCREMENT
attribute to generate a primary key when a new row is inserted into a table in MySQL.
Could somebody help me understand what is the default primary key generation strategy for MySQL and how does it work?
EDIT
Hibernate has a identifier generation strategy native
selects identity, sequence or hilo depending upon the capabilities of the underlying database. I used MySQL with hibernate.hbm2ddl.auto=update
which generated id BIGINT(20) NOT NULL AUTO_INCREMENT
for id
property of Long
Java data type.
I am trying to understand how did Hibernate choose AUTO_INCREMENT
when it used SchemaExport
tool. Is AUTO_INCREMENT
the default primary key generation strategy for MySQL?