擅长:python、mysql、java
<p>一种解决方案是使用以下位置:</p>
<pre><code>select title,
( stock_one + stock_two ) as global_stock
from product
order by 2, 1
</code></pre>
<p>但是,别名应该可以工作,但不一定是表达式。“全球股票=0”是什么意思?你的意思是说:</p>
<pre><code>select title,
( stock_one + stock_two ) as global_stock
from product
order by (case when global_stock = 0 then 1 else 0 end) desc, title
</code></pre>