Recently, I have come to analyze a procedure in which they have used below scenario. I want to know what is the usefulness of this ?
A procedure (cwrkid, date)
select statement
WHERE CWRK.cwrkid = NVL(in_cwrk_id,CWRK.cwrkid)
and in_cwrk_id
is passed null
. SO obviously, CWRK.cwrkid = CWRK.cwrkid
will always match... What the point in using variables and passing null
, and ultimately satisfying a truth condition.
Am I mising something or am I thinking a lot.. :P