Order by for Null in Oracle Stored Procedures
In Oracle, when order by descending is used, null values are returned to the top. To work around this, you just use NULLS LAST in your ORDER BY statement inside of your stored procedure.
Example:
SELECT name FROM customer ORDER BY name DESC NULLS LAST;
where “name” is a column in the “customer” table and ”DESC” is used to set a descending order
