sql SUM
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: sql SUM

  1. #1
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349

    Arrow sql SUM

    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.
    http://www.perf-engg.com
    A performance engineering forum

  2. #2
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    I thought it would be tough, it's really simple.

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

    sorry for silly posting..
    http://www.perf-engg.com
    A performance engineering forum

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,968
    Quote Originally Posted by malay_biswal
    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.
    this space intentionally left blank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width