Return the first non-NULL value in a list.
Section: Conditional, NULL, and Conversion Functions
Replace NULL with fallback value
sql
sql
SELECT COALESCE(phone, mobile_phone, 'N/A') AS preferred_phone
FROM contacts;Explanation
COALESCE is portable and common across SQL engines.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Conditional, NULL, and Conversion Functions