SQL Server Performance

QUERY HELP !!

Discussion in 'ALL SQL SERVER QUESTIONS' started by raydevang, Apr 10, 2014.

  1. raydevang New Member

    Suppose we have
    Table A Table B
    60 20
    21 30
    4 80
    6 40
    Now I need to subtract
    60-20 = 40
    60-30 = 30
    60-80 = -20
    60-40 = 20
    illy
    21-20 = 1
    21-30 = -9
    21-80 = 59
    21- 40 = 19
    illy
    4- 20 = -16
    and so on...........................
    How do I write a SQL query to get the output like that for 2 similar table
    Thanks

Share This Page