# Logical-not !, not

{% hint style="info" %}
The logical operator `!` , **`not`** can be used to inverse a logical condition or boolean value (Yes/No). \
If the condition evaluates to unknown, the inverse is also (still) unknown.

The operators **`!`** and **`not`** can both be used and are exactly the same.

This function is SQL compatible. For more information about SQL compatibility, see our [documentation](https://docs.wem.io/platform/wemreference/sql-compatibility).
{% endhint %}

{% hint style="success" %}
Returns a <mark style="color:green;">value</mark> that is the inverse of the original <mark style="color:blue;">`condition`</mark>.
{% endhint %}

<details>

<summary><code>!</code><mark style="color:blue;"><code>condition</code></mark> </summary>

`!True`\
\&#xNAN;*=> No*

`! (true or false)`\
\&#xNAN;*=> No*

`! (true and false)`\
\&#xNAN;*=> Yes*

`! (unknownboolean)`\
\&#xNAN;*=> unknown*

`! 123`\
*=> <mark style="color:red;">expression type mismatch</mark>*

</details>

<details>

<summary>not <mark style="color:blue;">condition</mark> </summary>

`not True`\
\&#xNAN;*=> No*

`not (true or false)`\
\&#xNAN;*=> No*

`not (true and false)`\
\&#xNAN;*=> Yes*

</details>
