我在将DATETIME(甚至日期)作为PRIMARY KEY的第一部分时遇到问题。 我使用MySQL 5.5 这是我的两张桌子: -- This is my standard table with dateDim as a dateTime CREATE TABLE `stats` ( `dateDim` datetime NOT NULL, `accountDim` mediumint(8) unsigned NOT NULL, `execCodeDim` smallint(5) unsigned NOT NULL, `operationTypeDim` tinyint(3) unsigned NOT NULL, `junkDim` tinyint(3) unsigned NOT NULL, `ipCountryDim` smallint(5) unsigned NOT NULL, `count` …