I don't understand how to choose a database in MySQL.(Error 1056)

70 views Asked by At
CREATE TABLE User(
    id INT PRIMARY KEY,
    names VARCHAR(100),
    aling VARCHAR(30),
    eye VARCHAR(30),
    hair VARCHAR(30),
    gender VARCHAR(30),
    apperences INT,
    year INT,
    universal VARCHAR(10)
)

everywhere I look, such an example is shown... and nowhere does it say how to choose a database. even with a direct request

21:42:26

CREATE TABLE User(
   id INT PRIMARY KEY,
   names VARCHAR(100),
   aling VARCHAR(30),
   eye VARCHAR(30),
   hair VARCHAR(30),
   gender VARCHAR(30),
   apperences INT,
   year INT,
   universal VARCHAR(10)
)

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

I expected that I would just write and everything would work, but no

0

There are 0 answers