Which SQL function is used to convert a NULL value in a query result into a default value, such as 0?
Trap 1: NVL
NVL is Oracle-specific.
Trap 2: IFNULL
IFNULL is MySQL-specific.
Trap 3: ISNULL
ISNULL is specific to certain SQL dialects like T-SQL but not standard SQL.
- A
NVL
Why it fails: NVL is Oracle-specific.
- B
COALESCE
COALESCE is the standard ANSI SQL function for handling NULLs.
- C
IFNULL
Why it fails: IFNULL is MySQL-specific.
- D
ISNULL
Why it fails: ISNULL is specific to certain SQL dialects like T-SQL but not standard SQL.