behzad
behzad

Reputation: 984

are automatically generated primary keys in H2 database always positive?

Can I assume that the automatically generated primary keys in H2 database are always positive?

Upvotes: 0

Views: 550

Answers (1)

behzad
behzad

Reputation: 984

Researching in the source code of H2, shows that the following SQL statement

create sequence some_name;

will generate a sequence from the default start value which is 1. (see source) It is however possible to have another start value, more info here

Upvotes: 1

Related Questions