Click to See Complete Forum and Search --> : sql SUM


malay_biswal
11-17-2005, 11:32 AM
I've arequirement like this.
A table TEST and in table 2 columns A and B.
need to write sql query like this.
select A,B, sum(A,B) from TEST;

that means if value of column A is 5 and column B is 10 output should be like.

A B SUM(A,B)
5 10 15

Any idea how to do this in a single sql.

malay_biswal
11-17-2005, 11:37 AM
I thought it would be tough, it's really simple.

select a,b,(a+b) from test.

sorry for silly posting..

gandolf989
11-17-2005, 02:42 PM
I thought it would be tough, it's really simple.

select a,b,(a+b) from test.

sorry for silly posting..

You post is by no means the silliest post on this site.
At least you were able to figure out what you needed to do. :)