# ALTER VIEW

The `ALTER VIEW` command atomically replaces a view with a new view defined by a `SELECT` statement. `ALTER VIEW` is an online operation and will not cause concurrently executing queries to fail.

## Syntax

```
ALTER
    [DEFINER = { <user> | CURRENT_USER }]
    [SCHEMA_BINDING = { ON | OFF }]
    VIEW <view_name>
    AS <select_statement>

```

## Remarks

* `ALTER VIEW` atomically replaces view `<view_name>` with a new view defined by `<select_statement>`.
* `ALTER VIEW` privileges are granted only to the designer of the view and to `SUPER` users. If a `SUPER` user alters a view, that user commandeers `ALTER` privileges from the designer of the view.
* The `DEFINER` clause (`ALTER DEFINER = <user>@<host> VIEW <viewname> AS SELECT ...`) specifies the user that should be used for security checks when a view is referenced by a query. The default value is `CURRENT_USER`.
* When `SCHEMA_BINDING` is set to `ON`, objects referenced by the view cannot be dropped if the view exists; you need to drop the view before dropping these objects. By default, `SCHEMA_BINDING` is set to `OFF`.
* The user who runs `ALTER DEFINER..VIEW` must have the `SUPER` permission.
* [Node Requirements for SingleStore Commands](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands.md)
* Refer to the [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md) for the required permissions.

## Examples

```sql
ALTER VIEW view_name AS SELECT * FROM table_name WHERE user_id = "real_person";

```

**Related Topics**

* [DROP VIEW](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-definition-language-ddl/drop-view.md)
* [CREATE VIEW](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-definition-language-ddl/create-view.md)

***

Modified at: June 12, 2026

Source: [/db/v9.1/reference/sql-reference/data-definition-language-ddl/alter-view/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-definition-language-ddl/alter-view/)

(An index of the documentation is available at /llms.txt)
