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

# Create a View

## Description

The `CREATE VIEW` statement creates a view, which is a great way to do data preparation in MindsDB. A VIEW is a saved `SELECT` statement, which is executed every time we call this view.

## Syntax

Here is the syntax:

```sql theme={null}
CREATE VIEW [IF NOT EXISTS] project_name.view_name AS (
    SELECT columns
    FROM integration_name.table_name AS a
    JOIN integration_name.table_name AS p ON a.id = p.id
    JOIN ...
);
```

Here is how to list all views:

```sql theme={null}
SHOW VIEWS;
```
