Voici ses principaux champs :
Nom du champ | Type du champ | Description du champ |
column_name | VarChar(64) | Nom de la colonne. |
index_name | VarChar(64) | Nom de l'index. |
non_unique | BigInt(1) | 1 si non unique. |
seq_in_index | BigInt(2) | Numéro de la colonne dans l'index. |
table_name | VarChar(64) | Nom de la table. |
table_schema | VarChar(64) | Nom du schéma de la table. |
SELECT
'',
b.catalog_name,
b.table_schema,
b.table_name,
a.index_name,
a.table_name,
CASE a.non_unique
WHEN 0 THEN 1
ELSE 0
END,
a.column_name,
a.seq_in_index
FROM INFORMATION_SCHEMA.STATISTICS a, INFORMATION_SCHEMA.TABLES b
WHERE
a.schema_name=b.schema_name
AND a.table_name=b.table_name
AND b.table_catalog LIKE 'MonCatalog%'
AND b.table_schema LIKE 'MonSchema%'
AND b.table_name LIKE 'MaTable%'
ORDER BY b.schema_name, b.table_name, a.index_name, a.seq_in_index;