You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL demo 1
CREATE TABLE dbo.virtual_production_record(
id bigint NOT NULL,
machine_group_code nvarchar(255) NOT NULL,
machine_code nvarchar(255) NOT NULL,
virtual_count int NOT NULL,
start_date varchar(50) NOT NULL,
end_date varchar(50) NOT NULL,
memo nvarchar(255) NOT NULL,
creator nvarchar(50) NOT NULL,
create_date varchar(50) NOT NULL,
editor nvarchar(50) NOT NULL,
edit_date varchar(50) NOT NULL,
_d int NOT NULL,
CONSTRAINT PK_virtual_production_record PRIMARY KEY CLUSTERED
(
id ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON PRIMARY
) ON PRIMARY
He was right, but made an error “Cannot parse statement: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CLUSTERED" <S_IDENTIFIER>
at line 14, column 54.
Was expecting:
"("”
SQL demo 2
ALTER TABLE dbo.virtual_production_record ADD CONSTRAINT DF_virtual_production_record__d DEFAULT ((0)) FOR _d
He was right, but made an error"
Cannot parse statement: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "DEFAULT" "DEFAULT"
at line 1, column 92.
Was expecting one of:
"CHECK"
"FOREIGN"
"KEY"
"PRIMARY"
"UNIQUE"
The text was updated successfully, but these errors were encountered:
CREATETABLEdbo.virtual_production_record (
id BIGINTNOT NULL
, machine_group_code NVARCHAR (255) NOT NULL
, machine_code NVARCHAR (255) NOT NULL
, virtual_count INTNOT NULL
, start_date VARCHAR (50) NOT NULL
, end_date VARCHAR (50) NOT NULL
, memo NVARCHAR (255) NOT NULL
, creator NVARCHAR (50) NOT NULL
, create_date VARCHAR (50) NOT NULL
, editor NVARCHAR (50) NOT NULL
, edit_date VARCHAR (50) NOT NULL
, _d INTNOT NULL
, CONSTRAINT pk_virtual_production_record
PRIMARY KEY/*CLUSTERED*/ ( id )
WITH (PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF,ALLOW_ROW_LOCKS='ON',ALLOW_PAGE_LOCKS='ON',OPTIMIZE_FOR_SEQUENTIAL_KEY=OFF) ON PRIMARY
) ON PRIMARY
;
In general I myself have very little interest in DDL statements for specific RDBMS (unless its Oracle or Postgres or H2) and you will need to provide or sponsor an implementation if you want to make this work.
Some keywords of SQLServer are not recognized
SQL demo 1
CREATE TABLE dbo.virtual_production_record(
id bigint NOT NULL,
machine_group_code nvarchar(255) NOT NULL,
machine_code nvarchar(255) NOT NULL,
virtual_count int NOT NULL,
start_date varchar(50) NOT NULL,
end_date varchar(50) NOT NULL,
memo nvarchar(255) NOT NULL,
creator nvarchar(50) NOT NULL,
create_date varchar(50) NOT NULL,
editor nvarchar(50) NOT NULL,
edit_date varchar(50) NOT NULL,
_d int NOT NULL,
CONSTRAINT PK_virtual_production_record PRIMARY KEY CLUSTERED
(
id ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON PRIMARY
) ON PRIMARY
He was right, but made an error “Cannot parse statement: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CLUSTERED" <S_IDENTIFIER>
at line 14, column 54.
Was expecting:
SQL demo 2
ALTER TABLE dbo.virtual_production_record ADD CONSTRAINT DF_virtual_production_record__d DEFAULT ((0)) FOR _d
He was right, but made an error"
Cannot parse statement: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "DEFAULT" "DEFAULT"
at line 1, column 92.
Was expecting one of:
The text was updated successfully, but these errors were encountered: