ISNULL Syntax:
SELECT ISNULL(column_name,0)
FROM table_name
Sales table:
ID | PRICE | NAME |
---|---|---|
1 | 100 | A |
2 | B | |
3 | 600 | C |
4 | D |
ISNULL Example:
SELECT id, ISNULL(price,0), name
FROM store;
ISNULL Result:
ID | PRICE | NAME |
---|---|---|
1 | 100 | A |
2 | 0 | B |
3 | 600 | C |
4 | 0 | D |