Table Sales_Data
The following SQL,
SELECT SUM(ISNULL(Sales,100)) FROM Sales_Data;
Table Sales_Data
returns 400. This is because NULL has been replaced by 100 via the ISNULL function.
| store_name | Sales |
| Store A | 300 |
| Store B | NULL |
The following SQL,
SELECT SUM(ISNULL(Sales,100)) FROM Sales_Data;
Table Sales_Data
| store_name | Sales |
| Store A | 300 |
| Store B | 100 |
returns 400. This is because NULL has been replaced by 100 via the ISNULL function.
No comments:
Post a Comment