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.

Syntax:

LNNVL (condition)

Example:
Students Table:

ID	CURRENT_MARKS	PREV_MARKS
1	80	        90
2	100	        97
3	95	        80
4	75	        70
5	85	        95

Query:

select * from students
where current_marks < prev_marks;

Output:

ID	CURRENT_MARKS	PREV_MARKS
1	80	        90
5	85	        95

Explanation:
Here, the LNNVL function will return all of the students whose current_marks is below their respective prev_marks.