Here is my unverified assumption:
ORDER BY IF(ISNULL(order_column), "", order_column) ASC, name_column DESC
If order_column is NULL, an empty string will be replaced that will not affect sorting. If it is not NULL, it will be sorted before the name column.
If Mysql does not allow you to use an expression in ORDER BY, you can always create an “artificial” column in SELECT:
SELECT
IF (ISNULL(order_column), " ", order_column)
AS my_order_column,
name_column
FROM table
ORDER BY my_order_column ASC, name_column DESC.
source
share