|
|
8. While doing an ascending order sort on a column having NULL values, where does the NULLs show up in the result set? At the beginning or at the end?
Ascending order sort - NULLs come last because Oracle treats NULLs are the largest possible values
Descending order sort - NULLs come first
* How to make NULLs come last in descending order sort?
Add NULLS LAST to the order by desc clause
Eg: select col1 from table1 order by col1 desc NULLS LAST
|
|