# 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](/platform/wemreference/sql-compatibility.md).
{% 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wem.io/platform/wemreference/operators/logical-not.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
