MYSQL:
获取表注释:
SELECT table_name 表名,TABLE_COMMENT 表注释 FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'yikang' ##数据库名
AND table_name LIKE 'food'##表名
获取字段注释:
SELECT COLUMN_NAME 列名, DATA_TYPE 字段类型, COLUMN_COMMENT 字段注释
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'food'##表名
AND table_schema = 'yikang'##数据库名
AND column_name = 'name'##字段名