> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Conditional and conversion functions

> Branch on conditions, handle NULLs, cast between types and read session context.

Branch on conditions, handle NULLs, cast between types and read session context.

| Function | Type | What it does |
| - | - | - |
| [`case`](/query/sql/functions/conditional/case) | Being confirmed | Previous docs; being confirmed. |
| [`cast`](/query/sql/functions/conditional/cast) | Scalar | Converts a value to a requested SQL type. |
| [`coalesce`](/query/sql/functions/conditional/coalesce) | Scalar | Returns the first non-NULL value from its arguments. |
| [`current_catalog`](/query/sql/functions/conditional/current_catalog) | Scalar | Returns the query’s current default catalog name. |
| [`current_schema`](/query/sql/functions/conditional/current_schema) | Scalar | Returns the query’s current default schema name. |
| [`decode`](/query/sql/functions/conditional/decode) | Scalar | Performs NULL-safe value selection or decodes bytes using a character set. |
| [`equal_null`](/query/sql/functions/conditional/equal_null) | Scalar | Compares two values with NULL-safe equality. |
| [`greatest`](/query/sql/functions/conditional/greatest) | Scalar | Returns the greatest value among compatible arguments. |
| [`if`](/query/sql/functions/conditional/if) | Scalar | Returns one of two values according to a Boolean condition. |
| [`iff`](/query/sql/functions/conditional/iff) | Scalar | Returns one of two values according to a Boolean condition. |
| [`ifnull`](/query/sql/functions/conditional/ifnull) | Scalar | Returns the first value when it is not NULL, otherwise the replacement value. |
| [`in`](/query/sql/functions/conditional/in) | Being confirmed | Previous docs; being confirmed. |
| [`isnull`](/query/sql/functions/conditional/isnull) | Scalar | Tests whether a value is SQL NULL. |
| [`least`](/query/sql/functions/conditional/least) | Scalar | Returns the least value among compatible arguments. |
| [`not`](/query/sql/functions/conditional/not) | Being confirmed | Previous docs; being confirmed. |
| [`nullif`](/query/sql/functions/conditional/nullif) | Scalar | Returns NULL when two values are equal, otherwise returns the first value. |
| [`nvl`](/query/sql/functions/conditional/nvl) | Scalar | Returns the first value when it is not NULL, otherwise the replacement value. |
| [`nvl2`](/query/sql/functions/conditional/nvl2) | Scalar | Returns one value for a non-NULL input and another for a NULL input. |
| [`to_boolean`](/query/sql/functions/conditional/to_boolean) | Being confirmed | Previous docs; being confirmed. |
| [`try_cast`](/query/sql/functions/conditional/try_cast) | Scalar | Converts a value to a requested SQL type and returns NULL for failed supported conversions. |
| [`try_to_number`](/query/sql/functions/conditional/try_to_number) | Scalar | Parses a string as a number and returns NULL if parsing fails. |
| [`typeof`](/query/sql/functions/conditional/typeof) | Scalar | Returns the SQL type name of an expression. |
| [`zeroifnull`](/query/sql/functions/conditional/zeroifnull) | Scalar | Returns zero for NULL input and otherwise returns the input value. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.