All versions: 3.11 | 3.10 | 3.9 | 3.8 | 3.7 | Development versions: 3.12 | Unsupported versions: 3.6 | 3.5 | 3.4

jOOQ currently supports the following DROP statements (SQL examples in PostgreSQL syntax):

Indexes

// Drop an index
create.dropIndex("I_AUTHOR_LAST_NAME").execute();

// Drop an index only if it exists (not all databases support this)
create.dropIndexIfExists("I_AUTHOR_LAST_NAME").execute();
// Drop a schema
create.dropSchema("schema").execute();

// Drop a schema only if it exists (not all databases support this)
create.dropSchemaIfExists("schema").execute();
// Drop a sequence
create.dropSequence(S_AUTHOR_ID).execute();

// Drop a sequence only if it exists (not all databases support this)
create.dropSequenceIfExists(S_AUTHOR_ID).execute();
// Drop a table
create.dropTable(AUTHOR).execute();

// Drop a table only if it exists (not all databases support this)
create.dropTableIfExists(AUTHOR).execute();
// Drop a view
create.dropView(V_AUTHOR).execute();

[// Drop a view only if it exists (not all databases support this)
create.dropViewIfExists(V_AUTHOR).execute();
The jOOQ Logo