metersk
metersk

Reputation: 12499

MySQL Error 1064 for Table Creation

I am getting this error: Error in query (1064): Syntax error near 'utf8_unicode_ci NOT NULL, Vendor text collate utf8_unicode_ci NOT NULL, ' at line 6

I have tried deleting line 6 and I am getting the same error in a different place.

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 ;

Upvotes: 0

Views: 172

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 178956

Line 6:

`RSSI` varchar(3) utf8_unicode_ci NOT NULL,

Should be...

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

Upvotes: 2

Related Questions