| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|||
|
Doesn't this work:
SELECT sum(col1+col2+col3) FROM theTable? And I can resist posting a variant using unions:
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 theTablePlease, tell us if this helps. |
![]() |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to write select query for merging two columns? | kajal | SQL - Questions and Answers | 1 | 03-13-2007 04:51 AM |
| How to use two joins in a single query? | Vaibhav Pingl | SQL - Questions and Answers | 1 | 11-29-2006 05:59 PM |
| Do two joins in a single query? | Scott | SQL - Questions and Answers | 2 | 06-08-2006 03:16 AM |