Jump to content
Larry Ullman's Book Forums

when i try to create the table users (on page 573), i got the following error. but i do not know the reason. please help


Recommended Posts

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

 Share

×
×
  • Create New...