How to add column values in mysql

前端 未结 7 2012
醉话见心
醉话见心 2020-12-09 15:37

This is my table data Student

\"enter

And this is my query --

7条回答
  •  佛祖请我去吃肉
    2020-12-09 16:13

    You don't need use SUM for this operation. Try this query:

    SELECT id, ( maths + chemistry + physics ) AS total, maths, chemistry, physics
    FROM `student`
    

提交回复
热议问题