Provide fallback values for nullable columns.
Section: JSONB, Arrays, and Date/Time Recipes
Use COALESCE
sql
sql
SELECT user_id, COALESCE(display_name, email) AS name FROM public.users;Explanation
See summary for usage details.
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 JSONB, Arrays, and Date/Time Recipes