Question

This is the table I try to create in JavaDB.

CREATE TABLE USER(
  userid INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
  displayName VARCHAR(20) not null,
  username VARCHAR(15) not null unique,
  password VARCHAR(15) not null,
  adminrole boolean default false,
  lastlogin timestamp default CURRENT TIMESTAMP
);

I get Error code -1, SQL state 42X01: Syntax error: BOOLEAN. Line 3, column 1

Was it helpful?

Solution

You have to use JavaDB Version 10.7 or later and also upgrade your database to new version too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top