擅长:python、mysql、java
<p>当你说“我在<em>数据库</em>中有2列”时,你的实际意思是在<strong>表中有2列,对吗</p>
<p>在sql for postgresql中,它类似于:</p>
<pre><code>select (case when ref_col = 1 then sent_time else accept_time end) as result_col
from mytable
</code></pre>
<p>我不知道这与SQL标准有多接近,但我会假设这并不遥远</p>