#1071 - Specified key was too long; max key length is 767 bytes
错误
SQL 查询:
CREATE TABLE `imooc_pro` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`pName` varchar( 255 ) NOT NULL ,
`pSn` varchar( 50 ) NOT NULL ,
`pNum` int( 10 ) unsigned DEFAULT '1',
`mPrice` decimal( 10, 2 ) NOT NULL ,
`iPrice` decimal( 10, 2 ) NOT NULL ,
`pDesc` text NOT NULL ,
`pubTime` int( 10 ) unsigned NOT NULL ,
`isShow` tinyint( 1 ) DEFAULT '1',
`isHot` tinyint( 1 ) DEFAULT '0',
`cId` smallint( 5 ) unsigned NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE KEY `pName` ( `pName` ) ,
UNIQUE KEY `pName_2` ( `pName` )
) ENGINE = InnoDB AUTO_INCREMENT =20 DEFAULT CHARSET = utf8;