我是 PHP 和 mySQL 的新手,我似乎不知道错误在哪里,查询是
分隔符 $$
CREATE TABLE `bms`.`client_unit_people` (
`unit_people_ID` int(13) unsigned NOT NULL AUTO_INCREMENT,
`client_block_ID` int(13) unsigned NOT NULL,
`client_unit_ID` int(13) unsigned NOT NULL,
`people_name` varchar(255) NOT NULL,
`people_salutation` varchar(255) NOT NULL,
`people_telephone` varchar(20) DEFAULT NULL,
`people_mobile` varchar(20) DEFAULT NULL,
`user_account_ID` int(13) unsigned DEFAULT NULL,
`web_access` enum('Yes','No') NOT NULL DEFAULT 'No',
`tel_prefs` enum('Yes','No') NOT NULL DEFAULT 'No',
`mob_prefs` enum('Yes','No') NOT NULL DEFAULT 'No',
`email_prefs` enum('Yes','No') NOT NULL DEFAULT 'No',
PRIMARY KEY (`unit_people_ID`),
KEY `FK_up_ua_idx` (`user_account_ID`),
KEY `FK_ua_up_idx` (`user_account_ID`),
KEY `FK_up_cu_idx` (`client_unit_ID`),
KEY `FK_up_cb_idx` (`client_block_ID`),
CONSTRAINT `FK_up_cb` FOREIGN KEY (`client_block_ID`) REFERENCES `client_blocks` (`client_block_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `FK_ua_up` FOREIGN KEY (`user_account_ID`) REFERENCES `user_accounts` (`user_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `FK_up_cu` FOREIGN KEY (`client_unit_ID`) REFERENCES `client_units` (`client_unit_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of people associated with units'$$
我收到的错误是:
错误代码:1005。无法创建表“bms.client_unit_people”(错误号:150)