SQL查询错误#1064没有任何明显错误

时间:2017-07-12 06:49:38

标签: mysql sql

我在这个错误上摸不着头脑。我试图通过phpmyadmin导入一个sql文件,它一个接一个地出现这个错误,我不能解决任何问题。有人可以分析下面的行,让我知道他们是否看到任何错误?

谢谢

--
-- Table structure for table `jos_address_members`
--

CREATE TABLE IF NOT EXISTS `jos_address_members` (
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `adid` int(10) unsigned NOT NULL DEFAULT '0',
  `publish` tinyint(4) NOT NULL DEFAULT '1',
  `ordering` tinyint(3) unsigned NOT NULL DEFAULT '9',
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
MySQL said: Documentation

#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 ') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' at line 12 

1 个答案:

答案 0 :(得分:1)

删除DEFAULT '9'

后的逗号
CREATE TABLE IF NOT EXISTS `jos_address_members` (
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `adid` int(10) unsigned NOT NULL DEFAULT '0',
  `publish` tinyint(4) NOT NULL DEFAULT '1',
  `ordering` tinyint(3) unsigned NOT NULL DEFAULT '9'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;