SELECT
C.TABLE_NAME AS '表名' ,
T.TABLE_COMMENT AS '表注释' ,
C.COLUMN_NAME AS '字段名' ,
C.EXTRA AS '主键',
C.COLUMN_TYPE AS '数据类型' ,
C.IS_NULLABLE AS '允许为空',
C.COLUMN_COMMENT AS '字段注释'
FROM
COLUMNS C
INNER JOIN TABLES T ON C.TABLE_SCHEMA = T.TABLE_SCHEMA
AND C.TABLE_NAME = T.TABLE_NAME
WHERE
T.TABLE_SCHEMA = 'beer'
mysql 导出数据字典语句
于 2020-11-09 17:54:15 首次发布