For example I have a table like this:
product | quantity | something
-------------------------------
abc | 5 | 2
xzy | 5 | 2
asd | 10 | 2
When I need all record I do like this and get 3 results:
select * from tableName
But I want get a 4th row for total of quantity(50) and something(6). Is it possible in sql query or I have to loop my result to get total after query execution? I want to do this in query if possible.
See Question&Answers more detail:os