Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10

ALTER VIEW .. RENAME

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

This statement allows for renaming a view.

Dialect support

This example using jOOQ:

alterView("v").renameTo("new_name")

Translates to the following dialect specific expressions:

ASE, SQLServer

EXEC sp_rename v, new_name

Aurora Postgres, CockroachDB, DuckDB, H2, Postgres, Snowflake, Trino, Vertica

ALTER VIEW v RENAME TO new_name

Exasol, Teradata

RENAME VIEW v TO new_name

HSQLDB, YugabyteDB

ALTER TABLE v RENAME TO new_name

Oracle

RENAME v TO new_name

Access, Aurora MySQL, BigQuery, ClickHouse, DB2, Derby, Firebird, Hana, Informix, MariaDB, MemSQL, MySQL, Redshift, SQLDataWarehouse, SQLite, Sybase

/* UNSUPPORTED */
Generated with jOOQ 3.20. Translate your own SQL on our website

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo