Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-06 09:43:56
Original
1029 people have browsed it

mysql动态生成数据存储过程

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!