Trevor Wood Trevor Wood - 1 year ago 72
SQL Question

Is it possible to select * where then add all results?

I have a sql table with a

and an

Is it possible to select
from table where
= ?
then add all integer results together and return just the one integer result?

Answer Source

You could do something like

SELECT sum(integer) As ReturnValue
FROM table
WHERE user_id = [value]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download