MySQL基础表和数据 如何进行行列转换 行转列 场景:报表统计(sum()).汇总显示表数据:select * from score; 希望达到的效果 cross join SQL如下: select a.student_name '学生名', a.score '语文', b.score '数学', c.score '英语' from (select student_name, score from score where course_name='语文') a cross join (sel…