title: How to order by maximum of two column which can be null in MySQL?
body: <pre><code>create table jobs(
      id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
          .....
          salaryminus INTEGER UNSIGNED DEFAULT NULL,
          salaryplus INTEGER UNSIGNED DEFAULT NULL,
          .....
  );
  </code></pre>
  
  <p>I want to do something like :</p>
  
  <pre><code>Select * from jobs order by maxof(salaryminus, salaryplus) limit 10;
  </code></pre>
  
  <p><code>maxof(Null,1000)</code> should be 1000,</p>
  
  <p>How to implement the <code>maxof</code>?</p>