If you want to create a table with an auto increment id column in JavaDB (Derby), the following SQL will do the trick for you applying some rules.
Source Code
The bold part is defining the column called 'ID' to be automatically generated and incremented by 1 every time a new record is written to the table.
1
2
3
4
5
6