title: Order By Last in SQL: Force a value to be last in the order
body: <p>In SQL, I have used</p>
  
  <pre><code>...ORDER BY name DESC NULLS LAST
  </code></pre>
  
  <p>which works quite awesome, yet is there any way that I can set a specific value to be last? Such as an empty string (@EMPTY).</p>
  
  <pre><code>...ORDER BY name DESC (@EMPTY) LAST
  </code></pre>
  
  <p>I am dynamically building SQL off of user choices on a table, and when the user changes the sort order, I change my sort order in my SQL. Also, the user can choose which column to sort by. The column that I am sorting by will either be type <code>text</code> or type <code>int</code>. I don't need any fancy <code>ORDER BY</code> when <code>column</code> is type <code>int</code>, but I do need to force all values of <code>""</code> to the end of the <code>ORDER BY</code> when the <code>type</code> of the <code>column</code> is <code>text</code>.</p>
  
  <p>Thanks!</p>