SQL语法错误:“错误:“ CHARACTER”附近:语法错误”

时间:2019-10-26 17:53:49

标签: sql error-handling syntax-error

我正在尝试创建一个表,以将文本文件中的巨大数据库分隔为username:email而不是整个用户:email:hash:etc

我有这个:

>>>CREATE TABLE `database`(
  `UserGUID` varchar(40) CHARACTER SET latin1 NOT NULL,
  `UserName` varchar(80) CHARACTER SET utf8 NOT NULL,
  `Email` varchar(128) CHARACTER SET latin1 NOT NULL,
  `Password` varchar(128) CHARACTER SET latin1 NOT NULL,
  `Salt` varchar(128) CHARACTER SET latin1 NOT NULL,
  `Strikes` int(10) unsigned NOT NULL DEFAULT '0',
  `Locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `Deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `CreatedDate` datetime NOT NULL,
  `UpdatedDate` datetime DEFAULT NULL,
  `DeletedDate` datetime DEFAULT NULL,
  `CreatedBy` varchar(40) CHARACTER SET latin1 NOT NULL DEFAULT 'System',
  `UpdatedBy` varchar(40) CHARACTER SET latin1 DEFAULT NULL,
  `DeletedBy` varchar(40) CHARACTER SET latin1 DEFAULT NULL,
  `EmailAuthenticated` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `FollowID` int(10) unsigned DEFAULT NULL,
  `DefaultLocationID` int(10) unsigned DEFAULT NULL,
  `birthDay` int(10) unsigned DEFAULT NULL,
  `birthMonth` int(10) unsigned DEFAULT NULL,
  `birthYear` int(10) unsigned DEFAULT NULL,
  `BirthDate` datetime DEFAULT NULL,
  `EmailAuthKey` varchar(45) COLLATE latin1_general_ci DEFAULT NULL,
  `CurrentCrowns` int(11) NOT NULL DEFAULT '0',
  `CurrentCardpoints` int(11) NOT NULL DEFAULT '0',
  `LastFreeCrowns` datetime DEFAULT NULL,
  `plaintextpassword` varchar(500) COLLATE latin1_general_ci DEFAULT NULL,
  `LastAuthEmail` datetime DEFAULT NULL,
  `premiumcards` int(11) DEFAULT NULL,
  `steamid` varchar(80) COLLATE latin1_general_ci DEFAULT NULL,
  `ExternalPromotionID` varchar(45) COLLATE latin1_general_ci DEFAULT NULL,
  `culture` varchar(40) COLLATE latin1_general_ci DEFAULT NULL,
  PRIMARY KEY (`UserGUID`) USING BTREE,
  UNIQUE KEY `Username` (`UserName`),
  UNIQUE KEY `Email` (`Email`),
  UNIQUE KEY `Follow` (`FollowID`) USING BTREE,
  KEY `EmailAuthenticated` (`EmailAuthenticated`),
  KEY `SteamID` (`steamid`),
  KEY `authkey` (`EmailAuthKey`),
  KEY `IX_CreatedDate` (`CreatedDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

我一直收到此错误:错误:“ CHARACTER”附近:语法错误

帮助?

0 个答案:

没有答案