Reputation: 76880
I've got a strange behaviour with an Oracle 9i database. If i make a query like this:
select * from table order by dp_dt_timestamp DESC;
where dp_dt_timestamp is a timestamp column, rows which have null values in the column dp_dt_timestamp come before those that have a value.
How can i put the null values as the last values and still have the timestamps ordered Descending?
Upvotes: 1
Views: 135
Reputation: 8959
order by dp_dt_timestamp DESC NULLS LAST
By default NULLs come last when sorting ASC and first when sorting DESC.
Upvotes: 4