Derby and othr databases support a special type of column - IDENTITY in Derby, autoincrement in MySQL - where the database automatically determines the value of the column if not explicitly specified. You're right that most of the time this is only applicable to primary key columns. However, this is not always the case. For databases like Oracle, the auto-increment is implemented via a sequence, and there is no requirement that the column need to be a primary key.
Hence, you need to specify both autoincrement and primarykey for the column for databases that require it.