我的表中包含一个由三列组成的索引。
有没有办法可以在information_schema中找到它,或者它只显示三个单独的索引?
答案 0 :(得分:0)
向Radek Postolowicz致信steering me正确的方向:
SELECT
table_name AS `Table`,
index_name AS `Index`,
GROUP_CONCAT(column_name ORDER BY seq_in_index) AS `Columns`
FROM information_schema.statistics
WHERE table_schema = 'db'
AND table_name='tbl'
GROUP BY 1,2;