웹이야기

MySQL 테이블 인덱스 보기 본문

D/MySQL

MySQL 테이블 인덱스 보기

yeon.Biju 2020. 3. 12. 16:31

MySQL 에서 테이블의 인덱스를 보기 위한 구문

 

mysql> SHOW INDEX FROM tbl_name

 

 

 


mysql> show index from COMTNSYSTEMCNTC ;
+-----------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| Table           | Non_unique | Key_name           | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
+-----------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| COMTNSYSTEMCNTC |          0 | PRIMARY            |            1 | CNTC_ID     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| COMTNSYSTEMCNTC |          0 | COMTNSYSTEMCNTC_PK |            1 | CNTC_ID     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
+-----------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
2 rows in set (0.00 sec)

 

'D > MySQL' 카테고리의 다른 글

MySQL 비교 연산자(MySQL 8.x 기준)  (0) 2020.03.18
MySQL AUTO_INCREMENT 값 수정  (0) 2020.03.13
MySQL character-set 확인 / MySQL 한글  (0) 2020.03.12
MySQL 정규표현식 구문  (0) 2020.03.09
MySQL REGEXP_LIKE() / REGEXP 함수  (1) 2020.03.09
Comments