Available in versions: Dev (3.21) | Latest (3.20)

DROP SYNONYM

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

This statement is used to drop a SYNONYM from the database catalog.

// Drop a synonym
create.dropSynonym("synonym").execute();

To drop a PUBLIC synonym, i.e. a synonym that doesn't belong to any schema or owner, write

create.dropPublicSynonym("s").execute();

Dialect support

This example using jOOQ:

dropSynonym("s")

Translates to the following dialect specific expressions:

DB2

DROP ALIAS s

Derby, H2, HSQLDB, Hana, Informix, Oracle, SQLServer

DROP SYNONYM s

ASE, Access, Aurora MySQL, Aurora Postgres, BigQuery, ClickHouse, CockroachDB, Databricks, DuckDB, Exasol, Firebird, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLite, Snowflake, 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