Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13

SQL transformation

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

jOOQ supports a few built in SQL transformations, which can be enabled through a variety of settings. These transformations will produce transformed SQL output regardless if the input was created using the DSL API, or the parser.

Table of contents

4.26.9.1.
ANSI JOIN to table lists
4.26.9.2.
Table lists to ANSI JOIN
4.26.9.3.
ROWNUM to LIMIT
4.26.9.4.
QUALIFY to derived table
4.26.9.5.
IN condition subquery with LIMIT to derived table
4.26.9.6.
GROUP BY <column index> (new)
4.26.9.7.
Inline CTE (new)
4.26.9.8.
Unnecessary arithmetic expressions
4.26.9.9.
Pattern based transformation
4.26.9.9.1.
AND to NOT IN
4.26.9.9.2.
Arithmetic comparisons (new)
4.26.9.9.3.
Arithmetic expressions
4.26.9.9.4.
BIT_GET function (new)
4.26.9.9.5.
BIT_SET function (new)
4.26.9.9.6.
CASE searched to CASE simple (new)
4.26.9.9.7.
CASE to CASE abbreviation (new)
4.26.9.9.8.
CASE with DISTINCT FROM to DECODE (new)
4.26.9.9.9.
CASE with ELSE NULL (new)
4.26.9.9.10.
COUNT(*) scalar subquery comparison
4.26.9.9.11.
COUNT(const) (new)
4.26.9.9.12.
COUNT(expr) scalar subquery comparison
4.26.9.9.13.
DISTINCT FROM NULL (new)
4.26.9.9.14.
Empty scalar subquery
4.26.9.9.15.
Flatten CASE (new)
4.26.9.9.16.
Flatten CASE abbreviations (new)
4.26.9.9.17.
Flatten DECODE (new)
4.26.9.9.18.
Hyperbolic functions
4.26.9.9.19.
Idempotent function repetition
4.26.9.9.20.
Inverse hyperbolic functions
4.26.9.9.21.
Logarithmic functions
4.26.9.9.22.
Merge AND predicates
4.26.9.9.23.
Merge BIT_NOT with BIT_NAND
4.26.9.9.24.
Merge BIT_NOT with BIT_NOR
4.26.9.9.25.
Merge BIT_NOT with BIT_XNOR
4.26.9.9.26.
Merge CASE .. WHEN and ELSE clauses (new)
4.26.9.9.27.
Merge CASE .. WHEN clauses (new)
4.26.9.9.28.
Merge IN predicates
4.26.9.9.29.
Merge NOT with comparison predicates
4.26.9.9.30.
Merge NOT with DISTINCT predicate
4.26.9.9.31.
Merge OR predicates
4.26.9.9.32.
Merge range predicates
4.26.9.9.33.
Normalise associative operations
4.26.9.9.34.
Normalise fields compared to values
4.26.9.9.35.
Normalise IN list with single element to comparison
4.26.9.9.36.
NOT AND (new)
4.26.9.9.37.
NOT OR (new)
4.26.9.9.38.
NULL ON NULL INPUT (new)
4.26.9.9.39.
OR to IN
4.26.9.9.40.
Repeated bitwise negation
4.26.9.9.41.
Repeated logical negation
4.26.9.9.42.
Repeated NOT
4.26.9.9.43.
Simplify CASE abbreviations (new)
4.26.9.9.44.
Trigonometric functions
4.26.9.9.45.
Trim
4.26.9.9.46.
Trivial bitwise operations (new)
4.26.9.9.47.
Trivial CASE abbreviations
4.26.9.9.48.
Trivial predicates
4.26.9.9.49.
Unnecessary DISTINCT (new)
4.26.9.9.50.
Unnecessary EXISTS subquery clauses (new)
4.26.9.9.51.
Unnecessary GROUP BY expressions (new)
4.26.9.9.52.
Unnecessary INNER JOIN (new)
4.26.9.9.53.
Unnecessary ORDER BY expressions (new)
4.26.9.9.54.
Unnecessary scalar subquery (new)
4.26.9.9.55.
Unreachable CASE clauses (new)
4.26.9.9.56.
Unreachable DECODE clauses (new)

previous : next

References to this page

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo