Home  >  Article  >  Database  >  mysql-Mysql存储过程:统计A表数据,B表(状态表)数据行生成动态列

mysql-Mysql存储过程:统计A表数据,B表(状态表)数据行生成动态列

WBOY
WBOYOriginal
2016-06-06 09:43:561024browse

mysql动态生成数据存储过程

A表有字段主键,编号,姓名,评价分数
B表有字段主键,key,描述
评价分数对应key
然后B表是一个状态表(比如有数据行:满意,一般,差评)
现在要统计信息:编号,姓名,(动态生成状态表里的数据)满意,一般,差评,满意率,一般率,差评率

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn