SELECT
COLUMN_NAME as '字段',
COLUMN_TYPE as '类型',
IS_NULLABLE as '空',
IFNULL(COLUMN_DEFAULT,'Null') as '默认',
IFNULL(COLUMN_COMMENT,'字面意思') as '注释'
FROM
information_schema.COLUMNS
WHERE
TABLE_SCHEMA = '数据库名称'
AND table_name = '表名'
AND COLUMN_NAME != '需要隐藏的字段'
生成数据字典专用 SQL
最新推荐文章于 2022-07-31 10:14:23 发布