LNNVL Function In Oracle
LNNVL is an advanced function that the Oracle database supports. It is used to evaluate a condition when one of the operands may contain a NULL value. The LNNVL function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, and Oracle 10g.
ID CURRENT_MARKS PREV_MARKS 1 80 90 2 100 97 3 95 80 4 75 70 5 85 95
select * from students where current_marks < prev_marks;
ID CURRENT_MARKS PREV_MARKS 1 80 90 5 85 95
Here, the LNNVL function will return all of the students whose current_marks is below their respective prev_marks.