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.
The SET statement
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Most databases support a variety of
SET statements to set session specific environment variables. jOOQ supports two of these set statements that are particularly useful when running DDL scripts:
SET CATALOG catalogname; SET SCHEMA schemaname;
Depending on whether your database supports catalogs and schemas, the above
SET statements may be supported in your database.
In MariaDB, MySQL, SQL Server, the SET CATALOG statement is emulated using:
In Oracle, the SET SCHEMA statement is emulated using:
ALTER SESSION SET CURRENT_SCHEMA = schemaname;