(2.8)Mysql之SQL基础——索引的查询与删除
1、索引查询
(1)按库查询
select * from information_schema.statistics where table_schema=‘test‘;
(2)按表查询
select * from information_schema.statistics where table_schema=‘test‘ and table_name = ‘test103‘;
(3)查询
show index from table_name from db_name;
[1]show index from test102; [2]show index from test102\G --grid网格 [2]show index from test102 from test;
(4)结果释义
[1]NON_UNIQUE:不是唯一索引(为1则不是唯一索引,为0则是唯一索引)
[2]SEQ_IN_INDEX:索引序列,如果大于1,则必定是复合索引
[3]CARDINALITY:基数,即行数
原文:https://www.cnblogs.com/gered/p/10427349.html