cant't create table in sql
I wrote the exact same code as the 'creating a table' as follows using mysql 8.0:
create table sales ( purchase_number int not null primary key auto_increment, date_of_purchase date not null, customer_id int, item_code int varchar(10) not null );
However, error 1064 keeps popping up like this:
May I know what's going wrong?
Thanks for reaching out.
Please remove the statement terminator (i.e. the semi-colon
CREATE TABLE sales and retry.
Hope this helps.
I had the same problem, you have to specify the name of the database in this way:
put "use [name of the database]" before the first sentence.