Oracle Order By NULL and 0.000 in Specific Order
To order by null and have the value 0.000 appear at the end, you can use the following query:
SELECT column_name
FROM table_name
ORDER BY column_name IS NULL, column_name = 0.000, column_name;
In this query, 'column_name' represents the column you want to order by.
The 'column_name IS NULL' condition will sort the null values first.
The 'column_name = 0.000' condition will sort the value 0.000 next.
Lastly, the 'column_name' alone will sort the remaining values in ascending order.
This order will ensure that null values are sorted first, followed by the value 0.000, and then the rest of the values.
原文地址: https://www.cveoy.top/t/topic/o8tq 著作权归作者所有。请勿转载和采集!