SELECT
TABLE_NAME '表名',
COLUMN_NAME '字段名',
COLUMN_TYPE '数据类型',
COLUMN_COMMENT '备注'
FROM
information_schema.COLUMNS
WHERE
TABLE_SCHEMA = 'jinran_service' and table_name = 'jinran_shop_order';
截图少说一个步骤,最后查询完,需要点击右上角的那个导出按钮,选择你想导出的类型,word,excel等
查询语句的where条件可以写字段名,数据库名(要搜索哪个数据库的数据字典),数据表名(某个数据库下的某个数据表)
1、SELECT column_name FROM information_schema.columns WHERE column_name LIKE '%搜索的字段%' AND table_schema = '你的数据库';
2、SELECT column_name FROM information_schema.columns WHERE column_name LIKE '%搜索的字段%' AND table_schema = '你的数据库' AND table_name = '你的表';