If anyone getting error 1046 this is because you haven't created a database to start with. Solution>
CREATE DATABASE sales;
USE sales;
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
);
REFRESH SCHEMA TO SEE THE NEW DATABASE 'SALES'.
2 answers ( 0 marked as helpful)
Hi Durinder!
Thanks for reaching out.
Thanks for sharing this piece of information with the Community!
Best,
Tsvetelin
Thank You!!