Mysql 创建索引

前端之家收集整理的这篇文章主要介绍了Mysql 创建索引前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

-- 显示创表语句
show create table bsd_promotion_inventory_limit;

-- 显示表索引
show index from bsd_promotion_inventory_limit;

-- 删除索引
alter table bsd_promotion_inventory_limit DROP INDEX product_promotion_union_unique;

-- 创建组合唯一索引
alter table bsd_promotion_inventory_limit
add unique index indexName(product_id,promotion_id) comment '产品促销组合索引';

 

猜你在找的MySQL相关文章