MySQL Sum() multiple columns

前端 未结 7 877
情话喂你
情话喂你 2020-12-05 01:16

I have a table of student scorecard. here is the table,

subject  | mark1 | mark2 | mark3 |......|markn
stud1    | 99    | 87    | 92    |      | 46
stud2            


        
7条回答
  •  执念已碎
    2020-12-05 02:17

    You could change the database structure such that all subject rows become a column variable (like spreadsheet). This makes such analysis much easier

提交回复
热议问题