SQL minus 2 columns - with null values

sql

Solution

Please try:

SELECT ISNULL([Row 1], 0) - ISNULL([Row 2], 0) from YourTable

For more Information visit ISNULL

Problem

I have this table (made from a SQL query): ``` Row 1 Row 2 2 1 3 NULL ``` And I want to minus the 2 columns, so I just select like this: ``` Select Row1 - Row2 From table ``` But then I get this result: ``` 1 NULL ``` instead of: ``` 1 3 ``` How can I make it possible to get the last result?

Original source