· 7 years ago · Jan 13, 2019, 03:24 AM
1incomprehensible error on this simple create table query
2CREATE TABLE IF NOT EXISTS `users` (
3 `id` int(11) NOT NULL AUTO_INCREMENT,
4 `register_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
5 `account_type` int(11) NOT NULL,
6 `active` int(11) NOT NULL,
7 `email` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
8 `login` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
9 `password` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
10 `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL
11 PRIMARY KEY (`id`)
12) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
13
14#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 '(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREME' at line 14
15
16`name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, -- <== this
17 PRIMARY KEY (`id`)