|previous : next|
Object qualification for columns
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
By default, jOOQ fully qualifies all columns with their table names (and the tables might themselves be qualified). This is a reasonable default, as any JOIN operation may produce ambiguous column names, such as the ubiquitous names
-- Columns always qualified with table name. SELECT table.column FROM table
DSL.using(configuration) .select(TABLE.COLUMN) .from(TABLE);
In rare cases, it may be desirable to drop this qualification, keeping it only either:
ALWAYS: This is the default. Columns are always qualified with their table.
WHEN_MULTIPLE_TABLES: When the FROM clause has multiple tables.
WHEN_AMBIGUOUS_COLUMNS: When the FROM clause produces ambiguous columns.
NEVER: Qualification is always dropped. This may produce semantically wrong SQL and is intended only to be used on a query by query basis, if any of the above does not implement requirements as desired.
new Settings() .withRenderTable(RenderTable.WHEN_MULTIPLE_TABLES) // Defaults to ALWAYS