Can mysql transfer rows to columns?

Student score sheet

clipboard.png

clipboard.png

:


mysqlpivot,group_cancat

sql:


:

clipboard.png

question: is it true that mysql can"t solve the problem of row swap? Row transfer columns should be used a lot in report statistics, how to solve the problem of mysql

Mar.26,2021

there are many methods on the Internet

learn about


Don't take the sql server method, use

on mysql
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bb4d-2c2a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bb4d-2c2a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?