SQL script is common language for web/database developers.
Sometime, a little bit tricky when you want to accomplish a request sound simple but yet challenging.
Case Study:
To sort a list of records with ‘Last Name’ ascending, but to make sure NULL value of ‘Last Name’ must at the end.
SELECT ID , LastName , FirstName , Email , Phone , Office FROM Table ORDER BY CASE WHEN LastName = '' THEN 1 ELSE 0 END, LastName