I know that nvl function works only for 'null', not empty string. I just wanted to know if there was a function that helps me replace blank/null values with another one.
I used instead:
CASE WHEN expression_1 is null or expression_1 = '' then expression_2 else expression_1
expression_1 column has empty cells, not null cells.
NVL()is a function most typically associated with Oracle. The equivalent standard SQL function isCOALESCE().By default, Oracle treats
NULLstrings and empty strings ('') as the same. So,'' IS NULLevaluates to "true" (and'' = ''rather confusingly evaluates toNULL, which is false in aWHEREclause).So, you can use
NVL()orCOALESCE()on an empty string. These are the same:Here is a db<>fiddle.