If anyone getting error 1046 this is because you haven't created a database to start with. Solution>
CREATE DATABASE sales;
CREATE TABLE sales
purchase_number INT NOT NULL PRIMARY KEY auto_increment,
date_of_purchase DATE NOT NULL,
item_code varchar(10) NOT NULL
REFRESH SCHEMA TO SEE THE NEW DATABASE 'SALES'.
1 answers ( 0 marked as helpful)