Correct me if I am wrong, but this SQL command:
create table MYTABLE (ID INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1))
the NOT NULL part is not needed, since the primary key, by default, must be non-zero.
Is this not repeated?
(I'm not sure to just check it out and agree as a result, programming is full of surprises in the long run)
I am using JavaDB / Derby.
source
share