This Oracle tutorial explains how to use the Oracle/PLSQL MEDIAN function with syntax and examples.
The Oracle/PLSQL MEDIAN function returns the median of an expression.
The syntax for the MEDIAN function in Oracle/PLSQL is:
The value used to calculate the median.
The MEDIAN function returns a numeric or date value.
The MEDIAN function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle MEDIAN function examples and explore how to use the MEDIAN function in Oracle/PLSQL.
For example:
The SQL statement above would return the median salary for all employees in the Marketing department.