I have a SELECT statement in T-SQL which replace null string to "N/A"
select
firstName,
lastName,
case city
when null then 'N/A'
else city
end,
case state
when null then 'N/A'
else state
end
from
Person left join Address on Person.personId = Address.personId
Output in T-SQL:
------------------------------ ------------------------------ ------------------------------ ------------------------------
Allen Wang N/A N/A
Bob Alice New York City New York
How do I do this in PostgreSQL?