Manikandan Thiagarajan
asked on
Could you Explain COALESCE function in Oracle
Could you Explain COALESCE function in Oracle
WHERE ACC_LV_CODE_ST like COALESCE(?, ACC_LV_CODE_ST)
WHERE ACC_LV_CODE_ST like COALESCE(?, ACC_LV_CODE_ST)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in your example, if ? (variable, user input ..) is null, it will result in:
WHERE ACC_LV_CODE_ST like ACC_LV_CODE_ST
which means: match all rows
if ? is passed (aka not null), it will be:
WHERE ACC_LV_CODE_ST like ?
hope this clarifies