I want to add two columns(number type) of a row, together but when one of those columns is null then the result is null. I handlled it by NVL function(NVL(col1,0) + NVL(col2,0)). But i want to return null when both are null(instead of 0). how can i handle it? Is there function in ORACLE that ignore null to sum two columns of a row?
| col1 | col2 | |
|:---- |:-----:|:-----------------------------------:|
| 1 | 2 | --> result have to be : 3 |
| 1 | null | --> result have to be : 1 |
| null | null | --> result have to be : null |