Last answered:

27 Apr 2023

Posted on:

11 Mar 2023

0

Resolved: hello am getting this error, what could i have done wrong

10:37:28    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 )    Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar.    0.000 sec

2 answers ( 1 marked as helpful)
Instructor
Posted on:

13 Mar 2023

0

Hi Mugarura!

Thanks for reaching out!


You need to execute this command:

USE sales;

or double-click on the database name in the Schemas navigator panel.


Hope this helps.
Best,
Tsvetelin

Posted on:

27 Apr 2023

0

Hi

Submit an answer