andrew wong Posted September 16, 2021 Share Posted September 16, 2021 MariaDB [ch18]> CREATE TABLE users( -> user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, -> first_name VARCHAR(20) NOT NULL, -> last_name VARCHAR(40) NOT NULL, -> email VARHCAR(60) NOT NULL, -> pass CHAR(40) NOT NULL, -> user_level TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, -> active CHAR(32), -> registration_date DATETIME NOT NULL, -> PRIMARY KEY (user_id), -> UNIQUE KEY (email), -> INDEX login (email, pass) -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(60) NOT NULL, pass CHAR(40) NOT NULL, user_level TINYINT(1) UNSIGNED NOT NUL...' at line 5 MariaDB [ch18]> Link to comment Share on other sites More sharing options...
Larry Posted September 16, 2021 Share Posted September 16, 2021 You have a typo. For the email you have "VARHCAR" when it should be "VARCHAR". Link to comment Share on other sites More sharing options...
andrew wong Posted September 16, 2021 Author Share Posted September 16, 2021 sorry for my mistake. thanks Link to comment Share on other sites More sharing options...
Recommended Posts