首页 > 数据库技术 > 详细

(2.8)Mysql之SQL基础——索引的查询与删除

时间:2019-02-24 19:07:11      阅读:157      评论:0      收藏:0      [点我收藏+]

(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:基数,即行数

 

(2.8)Mysql之SQL基础——索引的查询与删除

原文:https://www.cnblogs.com/gered/p/10427349.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!