Error code: 1064
This is the syntax I write and always results in an error
(
purchase_number INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
date_of_purchase DATE NOT NULL,
customer_id INT,
item_code VARCHAR(10) NOT NULL
);
1 answers ( 0 marked as helpful)
Hi Mohamed!
Thanks for reaching out.
You have missed the CREATE TABLE statement. The correct query is:
CREATE TABLE sales
(
purchase_number INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
date_of_purchase DATE NOT NULL,
customer_id INT,
item_code VARCHAR(10) NOT NULL
);
Hope this helps.
Best,
Tsvetelin