Open
Description
This is one of the tables from the famous sakila DB, I am using SQL Server.
CREATE TABLE actor (
actor_id INT NOT NULL IDENTITY ,
first_name VARCHAR(45) NOT NULL,
last_name VARCHAR(45) NOT NULL,
last_update DATETIME NOT NULL,
PRIMARY KEY NONCLUSTERED (actor_id)
);
These are 2 ways I tried to parse this statement and got error in both cases:
CCJSqlParserUtil.parse(ddlString, parser -> parser.withSquareBracketQuotation(true));
CCJSqlParserUtil.parse(ddlString);
Error:
Encountered unexpected token: "KEY" "KEY"
at line 1, column 164.
Was expecting one of:
"BINARY"
"BIT"
"CHAR"
"CHARACTER"
"DOUBLE"
"INTERVAL"
"JSON"
"SET"
"SIGNED"
"UNSIGNED"
"XML"
<DT_ZONE>
<K_DATETIMELITERAL>
<K_DATE_LITERAL>
<S_IDENTIFIER>
<S_QUOTED_IDENTIFIER>
is there any workaround available for this, other than modifying the DDL?
I am using JDK18 and jsqlparser version is 4.4.