how to view index in sql code example
Example 1: check all indexes on table
SELECT
tablename,
indexname,
indexdef
FROM
pg_indexes
WHERE
schemaname = 'yourschema' and tablename='yourtable'
ORDER BY
tablename,
indexname;
(POSTRGRESQL)
Example 2: display index in sql
SHOW INDEX FROM yourtable;
Example 3: display index in sql
SELECT DISTINCT
TABLE_NAME,
INDEX_NAME
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = 'your_schema';