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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...