Reputation: 1691
please advice whats the error in this statement, this statement was working fine before the last update for mysql
CREATE TABLE `users` (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50),
password VARCHAR(500) NOT NULL,
full_name VARCHAR(50),
is_author BOOLEAN DEFAULT ,
UNIQUE INDEX (username));
thanks in advance
Upvotes: 0
Views: 28
Reputation: 175556
Remove DEFAULT
or set to value:
CREATE TABLE `users` (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50),
`password` VARCHAR(500) NOT NULL,
full_name VARCHAR(50),
is_author BOOLEAN, -- here or DEFAULT true/false
UNIQUE INDEX (username));
Also qoute password
because it is keyword.
Upvotes: 3