| <table class="table"> |
| <thead> |
| <tr> |
| <th style="width:25%">Function</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>coalesce(expr1, expr2, ...)</td> |
| <td>Returns the first non-null argument if exists. Otherwise, null.</td> |
| </tr> |
| <tr> |
| <td>if(expr1, expr2, expr3)</td> |
| <td>If `expr1` evaluates to true, then returns `expr2`; otherwise returns `expr3`.</td> |
| </tr> |
| <tr> |
| <td>ifnull(expr1, expr2)</td> |
| <td>Returns `expr2` if `expr1` is null, or `expr1` otherwise.</td> |
| </tr> |
| <tr> |
| <td>nanvl(expr1, expr2)</td> |
| <td>Returns `expr1` if it's not NaN, or `expr2` otherwise.</td> |
| </tr> |
| <tr> |
| <td>nullif(expr1, expr2)</td> |
| <td>Returns null if `expr1` equals to `expr2`, or `expr1` otherwise.</td> |
| </tr> |
| <tr> |
| <td>nvl(expr1, expr2)</td> |
| <td>Returns `expr2` if `expr1` is null, or `expr1` otherwise.</td> |
| </tr> |
| <tr> |
| <td>nvl2(expr1, expr2, expr3)</td> |
| <td>Returns `expr2` if `expr1` is not null, or `expr3` otherwise.</td> |
| </tr> |
| <tr> |
| <td>CASE WHEN expr1 THEN expr2 [WHEN expr3 THEN expr4]* [ELSE expr5] END</td> |
| <td>When `expr1` = true, returns `expr2`; else when `expr3` = true, returns `expr4`; else returns `expr5`.</td> |
| </tr> |
| </tbody> |
| </table> |