Error creating a Oracle NoSQL table with ENUM fields

19 Views Asked by At

I have the following error when trying to create this table : IllegalArgumentException: Error: at (1, 88) Missing closing ')', at line 1:88

Create table TEST (
id String,
fileType ENUM (DOCUMENT,VIDEO),
status ENUM (IN_PROGRESS,PARTIAL_SUCCESS,SUCCEEDED,FAILED,NULL),
primary key (id)
)
1

There are 1 best solutions below

0
Dario On BEST ANSWER

I've spent a little time to understand what I was doing wrong, the error message is not clear.

Literal "null" is a reserved word in the query language so it is not supported in that location.

status ENUM (IN_PROGRESS,PARTIAL_SUCCESS,SUCCEEDED,FAILED,NULL),

By the way, We can insert data with null values for the ENUM fields.So, I just create the same table but without including the value NULL

Create table TEST (
id String,
fileType ENUM (DOCUMENT,VIDEO),
status ENUM (IN_PROGRESS,PARTIAL_SUCCESS,SUCCEEDED,FAILED),
primary key (id)
)