这个索引是区分大小写的
`id` int(11) NOT NULL,
`email` varchar(255) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `ggg` ( `id` int(11) NOT NULL, `email` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `idx_email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
这种索引使用这种字符集是不区分大小写的
CREATE TABLE `ggg1` (
`id` int(11) NOT NULL,
`email` varchar(255) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;