Reputation: 37
I just tried to create a table, here is my code:
CREATE TABLE new_final_assignment (
item_id VARCHAR(32) NOT NULL PRIMARY KEY,
test_assignment INT(10),
test_number VARCHAR(32),
test_start_date VARCHAR(32)
);
And this is the error:
ERROR: syntax error at or near "(" Position: 268 item_id VARCHAR(32) NOT NULL PRIMARY KEY, test_assignment INT(10), ^ test_number VARCHAR(32),
.
I just don't know where I'm wrong. The default_read_only statement is off as I confirmed. Could anyone help me solve this problem?
Upvotes: 1
Views: 590
Reputation: 50173
INT
Doesn't have user defined length. So, removed it.:
CREATE TABLE new_final_assignment (
item_id VARCHAR(32) NOT NULL PRIMARY KEY,
test_assignment INT, -- Length is not required
test_number VARCHAR(32),
test_start_date VARCHAR(32)
);
Upvotes: 1