Generally in SOQL, null values are sorted first. In order to sort null values at last make use of NULLS LAST keyword.
Sample:
SELECT Name, Id FROM Account ORDER BY Name DESC NULLS LAST
Sample:
SELECT Name, Id FROM Account ORDER BY Name DESC NULLS LAST
No comments:
Post a Comment