`nvl` is a SQL function present in its vendor-specific implementation by Oracle. It takes two arguments, and returns the first argument if it's non-null, and otherwise returns the second. It's similar to the function `coalesce` in standard SQL.
Questions having this tag should probably also be tagged with sql and/or plsql, as well as oracle and the corresponding version tag, as explained here.
Syntax:
nvl(expr1, expr2)
Return value: expr1
if expr1
is not NULL
; expr2
otherwise.
Example query:
SELECT patient, nvl(discharge_date, CURRENT_DATE) as last_seen FROM patients
Useful links: