MySql gets table fields and table field comments
demand
- Sometimes we need to query form fields for the front-end selection field to pass information
mysql5.7 writing
SELECT
column_name `column`,
column_comment columnName
FROM
information_schema.COLUMNS
WHERE
table_name = '表名'
-- SELECT DATABASE ( ) 获取当前使用表名的数据库名称
AND table_schema = ( SELECT DATABASE ( ) );