MySQL - Error 1064

 
Vista:

Error 1064

Publicado por Diego (1 intervención) el 11/05/2018 00:25:15
Buenas tardes.

Tengo un problema a la hora de crear una tabla.

Me pueden indicar donde está el error.

CREATE TABLE IF NOT EXISTS `key_value` (
`collection` varchar(128) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT 'A named collection of key and value pairs.'
`value` longblob NOT NULL COMMENT 'The value.',
PRIMARY KEY (`collection`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Generic key-value storage table. See the state system for…';

MySQL ha dicho: Documentación
#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 '`value` longblob NOT NULL COMMENT 'The value.',
PRIMARY KEY (`collection`,`nam' at line 9
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 98
Bronce
Ha mantenido su posición en MySQL (en relación al último mes)
Gráfica de MySQL

Error 1064

Publicado por Yamil Bracho (40 intervenciones) el 11/05/2018 00:36:38
A simple vista , te falta una coma en la defincion del primer campo, es decir

`collection` varchar(128) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT 'A named collection of key and value pairs.' ,
...

Lo otro que no te debe funcionar es que estas especificando que la clave primaria tienes un campo que no has definido( name)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar