zoukankan      html  css  js  c++  java
  • mysql查一张表有哪些索引

    可以用这个命令:

     show index from table_name;

    得到输出:

    +------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    | Table            | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
    +------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    | table_name |          0 | PRIMARY    |            1 | id          | A         |      661757 |     NULL | NULL   |      | BTREE      |         |               |
    | table_name |          0 | product_id |            1 | product_id  | A         |      661757 |     NULL | NULL   |      | BTREE      |         |               |
    +------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    2 rows in set (0.00 sec)
  • 相关阅读:
    sql
    po bo vo java bean
    jdk面试
    Bean 参数时间 设置
    kafka demo
    spring注解 动态修改注解的值
    参考资料
    Centos 编译带调试信息的libevent
    mysql 库表整体相关查询
    MySQL安装(linux)
  • 原文地址:https://www.cnblogs.com/charlesblc/p/7125612.html
Copyright © 2011-2022 走看看