我只是使用mysql mysqldump工具生成ddl,以便在另一台机器上创建SANE数据库。当我尝试在目标计算机上运行它时,会收到以下错误:
脚本行:28键列“friendprimarykeyinyour phone”在表中不存在
运行此语句:
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `friend` (
`id` bigint(20) unsigned NOT NULL,
`dependentId` bigint(20) unsigned NOT NULL,
`friendPrimaryKeyInYourPhone` int(10) unsigned NOT NULL,
`friendNameInYourPhone` varchar(45) NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`,`friendPrimaryKeyInYourPhone`) USING BTREE,
UNIQUE KEY `idx_dependendentId_phonePk` (`dependentId`,`friendPrimaryKeyInYour
Phone`),
KEY `idx_phonePk` (`friendPrimaryKeyInYourPhone`),
KEY `idx_dependentId` (`dependentId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
你知道MySQL如何生成这个DDL吗?几秒钟后就会认为它是无效的?