1

我正在尝试使用 phpmyadmin 复制表。它生成以下查询:

CREATE TABLE  `agendaeventos`.`diassemamaactivo` (

`idEvento` INT( 11 ) NOT NULL AUTO_INCREMENT ,
 `idExterno` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL ,
 `nombreEvento` TEXT CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL ,
 `entradilla` TEXT CHARACTER SET utf8 COLLATE utf8_spanish_ci,
 `descripcion` TEXT CHARACTER SET utf8 COLLATE utf8_spanish_ci,
 `diaDeInicio` DATE NOT NULL ,
 `diaDeFin` DATE NOT NULL ,
 `diaDeInicioYFinTexto` VARCHAR( 58 ) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL ,
 `horarioTexto` TEXT CHARACTER SET utf8 COLLATE utf8_spanish_ci,
 `fotoURL` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL ,
 `webURL` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_spanish_ci DEFAULT NULL ,
 `idFuente` INT( 11 ) NOT NULL ,
 `esRevisado` TINYINT( 1 ) NOT NULL DEFAULT  '0',
 `esModificado` TINYINT( 1 ) NOT NULL DEFAULT  '0',
 `fechaActualizacion` DATE DEFAULT NULL ,
 `diasSemanaActivo` CHAR( 7 ) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL DEFAULT  '1111111',
PRIMARY KEY (  `idEvento` )
) ENGINE = INNODB AUTO_INCREMENT = 372DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci

但它返回以下错误:

#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 '372DEFAULT CHARSET  = utf8 COLLATE  = utf8_unicode_ci' at line 17 

我看不出它有什么问题。

4

2 回答 2

3

像这样分开

372 DEFAULT

复制或编辑查询,更正并重新执行

于 2012-06-09T10:08:07.363 回答
2

您在 372DEFAULT 中缺少一个空格

于 2012-06-09T10:07:58.510 回答