Available in versions: Dev (3.21)

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

CASCADE

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

When dropping a view, the CASCADE clause extends the dropping to all dependent objects, including views, etc. The following two syntactic elements can be added to a DROP VIEW statement:

  • RESTRICT (the default): The DROP operation should fail if there are any dependent objects, such as views.
  • CASCADE: The DROP operation should succeed if there are any dependent objects, and drop those as well.

Dialect support

This example using jOOQ:

dropView("v").cascade()

Translates to the following dialect specific expressions:

CockroachDB, DuckDB, Exasol, H2, HSQLDB, Hana, Informix, Postgres, Redshift, YugabyteDB

DROP VIEW v CASCADE

Oracle

DROP VIEW v CASCADE CONSTRAINTS

ASE, Access, Aurora MySQL, Aurora Postgres, BigQuery, ClickHouse, DB2, Databricks, Derby, Firebird, MariaDB, MemSQL, MySQL, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Sybase, Teradata, Trino, Vertica

/* UNSUPPORTED */
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. 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