Mysql创建多列唯一索引Sql

时间:2023-03-08 18:06:31

ALTER TABLE `t_city_combo` ADD UNIQUE INDEX ` t_city_combo_index` (`combo_id`, `combo_name`, `city_id`) USING BTREE

语法


ALTER TABLE `表名英文` ADD UNIQUE INDEX ` 索引名英文` (`列1英文`, `列2英文`, `列3`) USING BTREE

Navicat 创建索引,需要如下步骤

在表右键-->设计表-->索引-->依次如下配置

Mysql创建多列唯一索引Sql

参考

http://www.365mini.com/page/mysql-index-operation.htm

2015年9月22日11:38:06

@落雨