Syntax errors when creating a table in MonetDB
This is driving me crazy and I'm at the point where I think I should just be missing something very obvious. We create MonetDB environment using SQiurrel. I although the problem was getting everything to plug in and get the drivers working, but as it turns out, it works and I can see the DB in all its glory.
I have a DB in MySQL that I need to rebuild, so I just generated the code:
CREATE TABLE "some_database"."some_table" (
key int(11) NOT NULL AUTO_INCREMENT,
column_1 varchar(10) DEFAULT NULL,
column_2 varchar(10) DEFAULT NULL,
column_3 varchar(10) DEFAULT NULL,
column_4 varchar(10) DEFAULT NULL,
column_5 varchar(10) DEFAULT NULL,
column_6 int(11) DEFAULT NULL,
column_7 decimal(10,2) DEFAULT NULL,
column_8 decimal(10,2) DEFAULT NULL,
column_9 int(11) DEFAULT NULL,
PRIMARY KEY (key)
) ENGINE=InnoDB AUTO_INCREMENT=20189170 DEFAULT CHARSET=utf8;
The only difference is that I changed the column and table names. I'm not sure if all of this is compatible to start with, but I figured I would just work around it as it throws errors. The first was about using `. MonetDB doesn't seem to be like you.
I removed those and now I get:
Error: syntax error, unexpected '(', expecting ')' or ',' in: "create table "some_database"."some_table" (
SQLState: 42000
ErrorCode: 0
Error: fact_key int("
SQLState: 22000
ErrorCode: 0
For column "key" I also get int (11), blush and say I have "expected EOF"
If I quickly type my own CREATE TABLE statement, I can create varchar tables. As soon as I add the int type, it goes crazy again.
So, for example, I just created this table in MonetDB:
CREATE TABLE "some_database"."some_table"
(
something varchar(10),
something2 varchar(10)
);
It worked fine. Once I add the int type:
CREATE TABLE "some_database"."some_table"
(
something varchar(10),
something2 varchar(10),
something3 int(10)
);
This is a bit mental again:
Error: syntax error, unexpected '(', expecting ')' or ',' in: "create table "some_database"."some_table"
SQLState: 42000
ErrorCode: 0
Error: (
SQLState: 22000
ErrorCode: 0
Error: something varchar(10),
SQLState: 22000
ErrorCode: 0
Error: something2 varchar(10),
SQLState: 22000
ErrorCode: 0
Error: something3 int("
SQLState: 22000
ErrorCode: 0
So my question is, did I put something wrong? MonetDB seems to be working well and I can research everything that one would expect in SQiurrel. I can create base tables with varchar, but as soon as I cast int the computer says no. I also don't understand what does EOF mean? I assumed this was expected, but is it?
Thanks in advance. I hope I just need a fresh mind that knows MonetDB to tell me why I am missing the obvious!
source to share