I have a DB with two colums team1score and team2score...
I want to select the row which has the highest combined two scores... how can i do this?
SELECT *, team1score+team2score as total FROM DATABASE order by total DESC Limit 1
Couple of things to note about the above example query:
'SELECT *' should never be used - name ONLY the the columns that you're going to use.
dagon probably meant 'TABLE' where he put 'DATABASE'.
I didn't know what, if any, other field(s) were wanted, but absolutely never use *
Yup
Thanks. 😃