如果函數<一個class="headerlink" href="//www.eheci.com/docs/sql/language-manual/functions/#if-function" title="">

適用於:檢查標記是的磚的SQL檢查標記是的磚運行時

返回expr1如果氣孔導度真正的,或expr2否則。

語法<一個class="headerlink" href="//www.eheci.com/docs/sql/language-manual/functions/#syntax" title="">

如果(氣孔導度,expr1,expr2)

參數<一個class="headerlink" href="//www.eheci.com/docs/sql/language-manual/functions/#arguments" title="">

  • 氣孔導度:一個布爾表達式。

  • expr1:任何類型的表達式。

  • expr2一:一個表達式<一個class="reference internal" href="//www.eheci.com/docs/docs/sql/language-manual/sql-ref-datatype-rules.html">最常見的類型expr1

返回<一個class="headerlink" href="//www.eheci.com/docs/sql/language-manual/functions/#returns" title="">

結果是通用最大的類型expr1expr2

這個函數是同義詞<一個class="reference internal" href="//www.eheci.com/docs/docs/sql/language-manual/functions/iff.html">敵我識別功能

例子<一個class="headerlink" href="//www.eheci.com/docs/sql/language-manual/functions/#examples" title="">

>選擇如果(1<2,“一個”,“b”);一個