ORDER BY [ASC/DESC] NULLS LAST;
In standard SQL (and most modern DBMS like Oracle, PostgreSQL, DB2, Firebird, Apache Derby, HSQLDB and H2) you can specify NULLS LAST or NULLS FIRST:
Use NULLS LAST to sort them to the end: Default is NULLS FIRST.
select *
from some_table
order by some_column DESC NULLS LAST
In standard SQL (and most modern DBMS like Oracle, PostgreSQL, DB2, Firebird, Apache Derby, HSQLDB and H2) you can specify NULLS LAST or NULLS FIRST:
Use NULLS LAST to sort them to the end: Default is NULLS FIRST.
select *
from some_table
order by some_column DESC NULLS LAST
Comments
Post a Comment