Databases · Junior · Question 75 of 75

Where do NULLs appear with ORDER BY last_login ASC in PostgreSQL?

Explanation

With DESC they come first. You can set it explicitly with NULLS FIRST or NULLS LAST. Other databases, like MySQL, sort NULLs differently.

Further reading

Problem with a question

Databases · Junior · question 75

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz