On Mon, 2003-01-13 at 14:11, Stevens, Ryan wrote:
> I understand the SQL statement in MySQL to be
> "SELECT sum(column name) FROM table;" but I would like to get a
> SUM of multiple columns. Is this possible??
Yes, you may use:
SELECT sum(c1+c2) FROM table;
or even:
SELECT sum(table1.v + tab
SELECT SUM(colA+colB) FROM TABLE ?
Stevens, Ryan wrote:
> I understand the SQL statement in MySQL to be "SELECT sum(column name) FROM table;"
>but I would like to get a SUM of multiple columns. Is this possible??
>
> Thanks,
>
> Ryan
>
>
* Stevens, Ryan
> I understand the SQL statement in MySQL to be "SELECT sum(column
> name) FROM table;" but I would like to get a SUM of multiple
> columns. Is this possible??
Yes. You can add multiple columns inside the SUM() function:
SELECT SUM(col1+col2+col3) FROM table;
--
Roger
sql
-
I understand the SQL statement in MySQL to be "SELECT sum(column name) FROM table;"
but I would like to get a SUM of multiple columns. Is this possible??
Thanks,
Ryan
-
Before posting, please check:
http://www.mysql.com/ma