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.

ALTER TABLE .. ALTER COLUMN .. DROP GENERATED

Supported by ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

An existing column GENERATED expression can be removed from a computed column using the ALTER TABLE's DROP GENERATED clause on a column:

// Drop the generated expression from a column
create.alterTable("table").alter("column").dropGenerated().execute();

Dialect support

This example using jOOQ:

alterTable("t").alter("c").dropGenerated()

Translates to the following dialect specific expressions:

Aurora Postgres, H2, Postgres

ALTER TABLE t ALTER c DROP EXPRESSION

DB2

ALTER TABLE t ALTER c DROP GENERATED

ASE, Access, Aurora MySQL, BigQuery, ClickHouse, CockroachDB, Databricks, DuckDB, Exasol, Firebird, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Spanner, Sybase, Teradata, Trino, Vertica, YugabyteDB

/* 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