I’m attempting to create a table called Students, with only one field, student_name.
student_name should be a VARCHAR and a primary key, because I want to uniquely identify students by their name.
CREATE TABLE 'swinters'.'Students' (
'student_name' VARCHAR NOT NULL,
PRIMARY KEY ('student_name')
)
ENGINE = InnoDB;
MYSQL Error Number 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, PRIMARY KEY ('student_name') ) ENGINE = InnoDB' at line 2.
You need to specify the
VARCHAR(N), whereNis the maximum string length