# DEALLOCATE
`DEALLOCATE` clears a prepared statement.

> For the complete documentation index, see [llms.txt](https://preview.materialize.com/materialize/40269/llms.txt).


`DEALLOCATE` clears [prepared statements](https://preview.materialize.com/materialize/40269/markdown-docs/sql/prepare/index.md) that have been created during the current session. Even without an explicit `DEALLOCATE` command, all prepared statements will be cleared at the end of a session.

## Syntax

```mzsql
DEALLOCATE <name>|ALL ;
```

Syntax element | Description
---------------|------------
`<name>`  | The name of the prepared statement to clear.
**ALL**  |  Clear all prepared statements from this session.

## Example

```mzsql
DEALLOCATE a;
```

## Related pages

- [`PREPARE`]
- [`EXECUTE`]

[`PREPARE`]:https://preview.materialize.com/materialize/40269/markdown-docs/sql/prepare/index.md
[`EXECUTE`]:https://preview.materialize.com/materialize/40269/markdown-docs/sql/execute/index.md
