T-SQL Tutorial

SQL ISNULL


ISNULL Syntax:

SELECT ISNULL(column_name,0)
FROM table_name

Sales table:

IDPRICENAME
1100A
2B
3600C
4D

ISNULL Example:

SELECT id, ISNULL(price,0), name
FROM store;

ISNULL Result:

IDPRICENAME
1100A
20B
3600C
40D