Help the world stop coronavirus! Stay home!

Prev Next

Hibernate / SQL

How do I order NULLS first while performing ascending order in SQL?

Extend the order by clause to include an optional NULLS FIRST or NULLS LAST clauses as shown below.

SELECT *
FROM Employee
ORDER BY dept_id ASC NULLS FIRST;


SELECT *
FROM Employee
ORDER BY dept_id DESC NULLS LAST;

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Maven

Comments & Discussions