title: Sort by null value in MariaDB
body: <p>I have a table with several columns, and I query this table using some of the columns for sorting. One of the fields not used for sorting is of integer (nullable) type - it is an ID for another system. What I'd like to see is records without such an ID to be sorted on top.</p>
  <p>If I just add the integer field to the front of my sort order, the whole table is sorted by the integer field which I do not want.</p>
  <p>How can I get records with null values in this column first but the rest of the table with the current sort order? Is there a sort like order by <code>is_null(fieldname)</code>?</p>