无法在mysql中复制表

时间:2012-06-09 10:05:22

标签: mysql phpmyadmin

我正在尝试使用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 

我看不出它有什么问题。

2 个答案:

答案 0 :(得分:3)

像这样分开

372 DEFAULT

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

答案 1 :(得分:2)

您在372DEFAULT中缺少空格