SQL 92 answer.
Re: can i wrire a query which sum up more than 2 columns in a single table?
Doesn't this work:
[sql]
select sum(col1+col2+col3) from theTable
[/sql]
?
And I can resist posting a variant using unions:
[sql]
select sum(col) from (select sum(c1) as col from t union all select sum(c2) as col from t union all select sum(c3) from t) as theTable
[/sql]
Please, tell us if this helps.
|