On 23/02/2013 13:21, john miltone wrote:
Hi All,

I am starting into Derby and I develop on Intellij IDEA with JDK 7.

I just want to create and start database. It seems very simple but the first and
unique code row generate a exception.

         String createString = "CREATE TABLE operation " + "(operation_ID INT
NOT NULL GENERATED ALWAYS AS IDENTITY " + " type VARCHAR(32) NOT NULL) " ;

Looks like you're missing a comma after AS IDENTITY; the statement should be:

  CREATE TABLE operation (
    operation_ID INT NOT NULL GENERATED ALWAYS AS IDENTITY,
    type VARCHAR(32) NOT NULL
  )

The exception is presumably reporting a syntax error, but since you didn't give details of the exception I can't be sure.

--
John English

Reply via email to