When I try to create a table I get a 1064 syntax error:
DROP TABLE IF EXISTS sandwiches;
CREATE TABLE sandwiches
(
sandwichid INT(3) NOT NULL AUTO_INCREMENT PRIMARY KEY,
sandwichname VARCHAR(20) UNSIGNED NOT NULL,
description VARCHAR(50),
image_name VARCHAR(30)
);
I also get the same error for this table:
DROP TABLE IF EXISTS origins;
CREATE TABLE origins
(
image_name VARCHAR(20) UNSIGNED NOT NULL,
origin VARCHAR(20),
price DECIMAL(5,2),
PRIMARY KEY(image_name)
);
When I change image_name to INT, it doesn't give this error but image_name needs to be VARCHAR.