complex Subtract in sql server query

Posted by AmRoSH on Stack Overflow See other posts from Stack Overflow or by AmRoSH
Published on 2010-05-20T16:12:37Z Indexed on 2010/05/20 16:30 UTC
Read the original article Hit count: 243

Filed under:
|

Hello,

I have table like following

PK      num1   num2  numsdiff
1       10     15    ?
2       20     25    ?
3       30     35    ?
4       40     45    ?

i need to get Subtract of 20 - 15 and 30 - 25 and 40 - 35 and so on by select query from this table.

any ideas?.

thanks

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about query