subtraction

  • Hi,

    I have a table 'aaa' with column 'a1' and another table 'bbb' with column 'b1'.I wanted to compute the value a1-b1.How can i do that,

    Thanks.

  • Are you just looking at arithmetic difference between these two columns?

    If so use Inner join between two tables to compute the value required

    
    
    SELECT aaa.a1 - bbb.b1
    FROM aaa
    JOIN bbb
    ON (<aaa.key> = <bbb.key>
    ..........)

    Include all the join conditions in ON clause

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply