查看某一个库下某一张表的索引
SELECT DISTINCT lower(index_name) index_name,lower(index_type) type FROM information_schema.statistics
WHERE table_schema = 'employees' AND table_name = 'employees';
查看某一个库下某一张表的某一个索引
SELECT lower(column_name) column_name,seq_in_index column_position FROM information_schema.statistics
WHERE table_schema = 'employees' AND table_name = 'employees' AND index_name = 'primary';
查看某一个库下某一个表的注释
SELECT table_comment comments FROM information_schema.TABLES
WHERE table_schema = 'employees' AND table_name = 'employees';
查看某一个库下某一个表的列的注释
SELECT lower(column_name) column_name,column_comment comments
FROM COLUMNS WHERE table_schema = 'employees' AND table_name = 'employees';