0
`CREATE TABLE IF NOT EXISTS `Odin`.`Usuario` (
`CodUsuario` INT NOT NULL AUTO_INCREMENT,
`CodTipoUsuario` INT NOT NULL,
`CodConsultorTecnico` INT NULL,
`CodProdutor` INT NULL,
`Login` VARCHAR(255) CHARACTER SET 'utf8mb4' NOT NULL,
`Senha` VARCHAR(32) CHARACTER SET 'utf8mb4' NOT NULL,
`Ativo` TINYINT(1) NOT NULL,
`MaiorDataRegistrada` DATETIME NOT NULL,
`DataLimite` DATETIME NOT NULL DEFAULT '01/01/2014',
`MaxFazendas` INT NOT NULL DEFAULT 0,
`MaxFemeas` INT NOT NULL DEFAULT 0,
`CodUserWeb` INT NOT NULL DEFAULT 0,
`CodEstudante` INT NULL,
`UltimoBackup` DATETIME NULL,
PRIMARY KEY (`CodUsuario`),
UNIQUE INDEX `UQ__Usuario__00000000000006D8` (`Login` ASC),
CONSTRAINT `FK_Usu_ref_Est`
FOREIGN KEY (`CodEstudante`)
REFERENCES `Odin`.`Estudante` (`CodEstudante`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_Consultor`
FOREIGN KEY (`CodConsultorTecnico`)
REFERENCES `Odin`.`ConsultorTecnico` (`CodConsultorTecnico`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_Produtor`
FOREIGN KEY (`CodProdutor`)
REFERENCES `Odin`.`Produtor` (`CodProdutor`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `Fk_Usuario_Ref_TipoUsuario`
FOREIGN KEY (`CodTipoUsuario`)
REFERENCES `Odin`.`ConfTipoUsuario` (`CodTipoUsuario`)
ON DELETE NO ACTION
ON UPDATE NO ACTION) `
我試圖解決方案,如: ENGINE = InnoDB的默認字符集= UTF8 COLLATE = utf8_unicode_ci; 或 ENGINE = InnoDB DEFAULT CHARSET = utf16 COLLATE = utf8_unicode_ci;我的SQL腳本埃羅1071 - 不起作用添加特定或更換髮動機
或添加唯一
,仍然繼續錯誤:
1071 - 指定的鍵過長;最大密鑰長度是767字節
有人可以幫助我嗎?謝謝
[#1071 - 指定的密鑰太長;最大密鑰長度是767字節](http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes) – DanFromGermany
我看到了這個解決方案,但無法使它工作,無論如何感謝嘗試 –