用于表创建的MySQL错误1064

时间:2013-11-06 01:13:21

标签: mysql

我收到此错误:查询错误(1064):'utf8_unicode_ci NOT NULL附近的语法错误,Vendor文本整理utf8_unicode_ci NOT NULL,'第6行

我尝试删除第6行,但我在其他地方遇到同样的错误。

CREATE TABLE IF NOT EXISTS `wifiScan` (
  `ID_frame` int(11) NOT NULL auto_increment,
  `TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `MAC` varchar(17) collate utf8_unicode_ci NOT NULL,
  `AP` text collate utf8_unicode_ci NOT NULL,
  `RSSI` varchar(3) utf8_unicode_ci NOT NULL,
  `Vendor` text collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`ID_frame`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

1 个答案:

答案 0 :(得分:2)

第6行:

`RSSI` varchar(3) utf8_unicode_ci NOT NULL,

应该......

`RSSI` varchar(3) COLLATE utf8_unicode_ci NOT NULL,