Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10
The jOOQ User Manual
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Overview
This manual is divided into six main sections:
-
Getting started with jOOQ
This section will get you started with jOOQ quickly. It contains simple explanations about what jOOQ is, what jOOQ isn't and how to set it up for the first time
-
SQL building
This section explains all about the jOOQ syntax used for building queries through the query DSL and the query model API. It explains the central factories, the supported SQL statements and various other syntax elements
-
Code generation
This section explains how to configure and use the built-in source code generator
-
SQL execution
This section will get you through the specifics of what can be done with jOOQ at runtime, in order to execute queries, perform CRUD operations, import and export data, and hook into the jOOQ execution lifecycle for debugging
-
Tools
This section is dedicated to tools that ship with jOOQ.
-
Reference
This section is a reference for elements in this manual
Table of contents
- 1.
- Copyright, License, and Trademarks
- 2.
- Getting started with jOOQ
- 2.1.
- How to read this manual
- 2.2.
- The sample database used in this manual
- 2.3.
- Different use cases for jOOQ
- 2.3.1.
- jOOQ as a SQL builder without code generation
- 2.3.2.
- jOOQ as a SQL builder with code generation
- 2.3.3.
- jOOQ as a SQL executor
- 2.3.4.
- jOOQ for CRUD
- 2.3.5.
- jOOQ for PROs
- 2.4.
- Downloading jOOQ
- 2.5.
- Tutorials
- 2.5.1.
- jOOQ in 7 easy steps
- 2.5.1.1.
- Step 1: Preparation
- 2.5.1.2.
- Step 2: Your database
- 2.5.1.3.
- Step 3: Code generation
- 2.5.1.4.
- Step 4: Connect to your database
- 2.5.1.5.
- Step 5: Querying
- 2.5.1.6.
- Step 6: Iterating
- 2.5.1.7.
- Step 7: Explore!
- 2.5.2.
- Using jOOQ with Flyway
- 2.5.3.
- Using jOOQ with jbang
- 2.6.
- jOOQ and Java 8
- 2.7.
- jOOQ and Scala
- 2.8.
- jOOQ and Groovy
- 2.9.
- jOOQ and Kotlin
- 2.10.
- jOOQ and NoSQL
- 2.11.
- jOOQ and JPA
- 2.12.
- Build your own
- 2.13.
- jOOQ and backwards-compatibility
- 3.
- SQL building
- 3.1.
- The query DSL type
- 3.1.1.
- DSL subclasses
- 3.2.
- The DSLContext API
- 3.2.1.
- SQL Dialect
- 3.2.2.
- SQL Dialect Family
- 3.2.3.
- Connection vs. DataSource
- 3.2.4.
- Custom data
- 3.2.5.
- Custom ExecuteListeners
- 3.2.6.
- Custom Unwrappers
- 3.2.7.
- Custom Settings
- 3.2.7.1.
- Auto-attach Records
- 3.2.7.2.
- Backslash Escaping
- 3.2.7.3.
- Batch size
- 3.2.7.4.
- Dialect compatibility
- 3.2.7.5.
- Execute Logging
- 3.2.7.6.
- Fetch Warnings
- 3.2.7.7.
- GROUP_CONCAT Configuration
- 3.2.7.8.
- Identifier style
- 3.2.7.9.
- Implicit join type
- 3.2.7.10.
- Inline Threshold
- 3.2.7.11.
- IN-list Padding
- 3.2.7.12.
- Interpreter Configuration
- 3.2.7.13.
- JDBC Flags
- 3.2.7.14.
- Keyword style
- 3.2.7.15.
- Listener Invocation Order
- 3.2.7.16.
- Locales
- 3.2.7.17.
- Map JPA Annotations
- 3.2.7.18.
- Object qualification
- 3.2.7.19.
- Optimistic Locking
- 3.2.7.20.
- Parameter name prefix
- 3.2.7.21.
- Parameter types
- 3.2.7.22.
- Parser Configuration
- 3.2.7.23.
- Readonly column behaviour (new)
- 3.2.7.24.
- Reflection caching
- 3.2.7.25.
- Return all columns on store
- 3.2.7.26.
- Return Identity Value On Store
- 3.2.7.27.
- Runtime catalog, schema and table mapping
- 3.2.7.28.
- Scalar subqueries for stored functions
- 3.2.7.29.
- Statement Type
- 3.2.7.30.
- Updatable Primary Keys
- 3.2.8.
- Thread safety
- 3.3.
- The DSL API
- 3.3.1.
- Mutability (historic) (new)
- 3.4.
- The model API (new)
- 3.4.1.
- Design (new)
- 3.4.2.
- Traversal (new)
- 3.4.3.
- Replacement (new)
- 3.4.4.
- The historic model API (new)
- 3.5.
- SQL Statements (DML)
- 3.5.1.
- The WITH clause
- 3.5.2.
- The WITH RECURSIVE clause
- 3.5.3.
- The SELECT statement
- 3.5.3.1.
- SELECT clause
- 3.5.3.1.1.
- Projection type safety
- 3.5.3.1.2.
- SelectField
- 3.5.3.1.3.
- SELECT *
- 3.5.3.1.4.
- SELECT * EXCEPT (...)
- 3.5.3.1.5.
- SELECT DISTINCT
- 3.5.3.1.6.
- SELECT DISTINCT ON
- 3.5.3.1.7.
- Convenience methods
- 3.5.3.2.
- FROM clause
- 3.5.3.3.
- JOIN operator
- 3.5.3.4.
- Implicit path JOIN
- 3.5.3.5.
- WHERE clause
- 3.5.3.6.
- CONNECT BY clause
- 3.5.3.7.
- GROUP BY clause
- 3.5.3.7.1.
- GROUP BY columns
- 3.5.3.7.2.
- GROUP BY tables
- 3.5.3.7.3.
- GROUP BY ROLLUP
- 3.5.3.7.4.
- GROUP BY CUBE
- 3.5.3.7.5.
- GROUP BY GROUPING SETS
- 3.5.3.7.6.
- GROUP BY empty grouping set
- 3.5.3.8.
- HAVING clause
- 3.5.3.9.
- WINDOW clauseWINDOW clause
- 3.5.3.10.
- QUALIFY clause
- 3.5.3.11.
- ORDER BY clause
- 3.5.3.11.1.
- Ordering by field index
- 3.5.3.11.2.
- Ordering and NULLS
- 3.5.3.11.3.
- Ordering using CASE expressions
- 3.5.3.11.4.
- Oracle's ORDER SIBLINGS BY clause
- 3.5.3.12.
- LIMIT .. OFFSET clause
- 3.5.3.13.
- WITH TIES clause
- 3.5.3.14.
- SEEK clause
- 3.5.3.15.
- FOR clause
- 3.5.3.16.
- FOR UPDATE clause
- 3.5.3.17.
- Set operations
- 3.5.3.17.1.
- Type safety
- 3.5.3.17.2.
- Projection rowtype
- 3.5.3.17.3.
- Differences to standard SQL
- 3.5.3.17.4.
- UNION
- 3.5.3.17.5.
- INTERSECT
- 3.5.3.17.6.
- EXCEPT
- 3.5.3.18.
- Lexical and logical SELECT clause order
- 3.5.4.
- The INSERT statement
- 3.5.4.1.
- INSERT .. VALUES
- 3.5.4.2.
- INSERT .. DEFAULT VALUES
- 3.5.4.3.
- INSERT .. SET
- 3.5.4.4.
- INSERT .. SELECT
- 3.5.4.5.
- INSERT .. ON DUPLICATE KEY UPDATE
- 3.5.4.6.
- INSERT .. ON DUPLICATE KEY IGNORE
- 3.5.4.7.
- INSERT .. ON CONFLICT
- 3.5.4.8.
- INSERT .. RETURNING
- 3.5.5.
- The UPDATE statement
- 3.5.5.1.
- UPDATE .. SET
- 3.5.5.2.
- UPDATE .. SET ROW
- 3.5.5.3.
- UPDATE .. FROM
- 3.5.5.4.
- UPDATE .. WHERE
- 3.5.5.5.
- UPDATE .. ORDER BY .. LIMIT
- 3.5.5.6.
- UPDATE .. RETURNING
- 3.5.6.
- The DELETE statement
- 3.5.6.1.
- DELETE .. USING
- 3.5.6.2.
- DELETE .. WHERE
- 3.5.6.3.
- DELETE .. ORDER BY .. LIMIT
- 3.5.6.4.
- UPDATE .. RETURNING
- 3.5.7.
- The MERGE statement
- 3.6.
- SQL Statements (DDL)
- 3.6.1.
- The ALTER statement
- 3.6.1.1.
- ALTER DATABASE
- 3.6.1.1.1.
- ALTER DATABASE .. RENAME
- 3.6.1.1.2.
- ALTER DATABASE IF EXISTS
- 3.6.1.2.
- ALTER DOMAIN
- 3.6.1.2.1.
- ALTER DOMAIN .. RENAME
- 3.6.1.2.2.
- ALTER DOMAIN .. SET DEFAULT
- 3.6.1.2.3.
- ALTER DOMAIN .. DROP DEFAULT
- 3.6.1.2.4.
- ALTER DOMAIN .. SET NOT NULL
- 3.6.1.2.5.
- ALTER DOMAIN .. DROP NOT NULL
- 3.6.1.2.6.
- ALTER DOMAIN .. ADD CONSTRAINT
- 3.6.1.2.7.
- ALTER DOMAIN .. RENAME CONSTRAINT
- 3.6.1.2.8.
- ALTER DOMAIN .. RENAME CONSTRAINT IF EXISTS
- 3.6.1.2.9.
- ALTER DOMAIN .. DROP CONSTRAINT
- 3.6.1.2.10.
- ALTER DOMAIN .. DROP CONSTRAINT IF EXISTS
- 3.6.1.2.11.
- ALTER DOMAIN IF EXISTS
- 3.6.1.3.
- ALTER INDEX
- 3.6.1.3.1.
- ALTER INDEX .. RENAME
- 3.6.1.3.2.
- ALTER INDEX IF EXISTS
- 3.6.1.4.
- ALTER SCHEMA
- 3.6.1.4.1.
- ALTER SCHEMA .. RENAME
- 3.6.1.4.2.
- ALTER SCHEMA IF EXISTS
- 3.6.1.5.
- ALTER SEQUENCE
- 3.6.1.5.1.
- ALTER SEQUENCE .. RENAME
- 3.6.1.5.2.
- ALTER SEQUENCE .. CACHE
- 3.6.1.5.3.
- ALTER SEQUENCE .. CYCLE
- 3.6.1.5.4.
- ALTER SEQUENCE .. MINVALUE
- 3.6.1.5.5.
- ALTER SEQUENCE .. t reaches its MAXVALUE
- 3.6.1.5.6.
- ALTER SEQUENCE .. INCREMENT BY
- 3.6.1.5.7.
- ALTER SEQUENCE .. START WITH
- 3.6.1.5.8.
- ALTER SEQUENCE .. RESTART
- 3.6.1.5.9.
- ALTER SEQUENCE IF EXISTS
- 3.6.1.6.
- ALTER TABLE
- 3.6.1.6.1.
- ALTER TABLE .. ADD COLUMN
- 3.6.1.6.2.
- ALTER TABLE .. ADD COLUMN .. FIRST, BEFORE, AFTER
- 3.6.1.6.3.
- ALTER TABLE .. ADD COLUMNS
- 3.6.1.6.4.
- ALTER TABLE .. ADD COLUMN IF NOT EXISTS
- 3.6.1.6.5.
- ALTER TABLE .. ADD PRIMARY KEY
- 3.6.1.6.6.
- ALTER TABLE .. ADD UNIQUE
- 3.6.1.6.7.
- ALTER TABLE .. ADD FOREIGN KEY
- 3.6.1.6.8.
- ALTER TABLE .. ADD CHECK
- 3.6.1.6.9.
- ALTER TABLE .. RENAME
- 3.6.1.6.10.
- ALTER TABLE .. COMMENT
- 3.6.1.6.11.
- ALTER TABLE .. ALTER COLUMN .. SET DEFAULT
- 3.6.1.6.12.
- ALTER TABLE .. ALTER COLUMN .. DROP DEFAULT
- 3.6.1.6.13.
- ALTER TABLE .. ALTER COLUMN .. SET NOT NULL
- 3.6.1.6.14.
- ALTER TABLE .. ALTER COLUMN .. DROP NOT NULL
- 3.6.1.6.15.
- ALTER TABLE .. ALTER COLUMN .. SET TYPE
- 3.6.1.6.16.
- ALTER TABLE .. ALTER CONSTRAINT .. ENFORCED
- 3.6.1.6.17.
- ALTER TABLE .. ALTER CONSTRAINT .. NOT ENFORCED
- 3.6.1.6.18.
- ALTER TABLE .. RENAME COLUMN
- 3.6.1.6.19.
- ALTER TABLE .. RENAME CONSTRAINT
- 3.6.1.6.20.
- ALTER TABLE .. RENAME INDEX
- 3.6.1.6.21.
- ALTER TABLE .. DROP COLUMN
- 3.6.1.6.22.
- ALTER TABLE .. DROP COLUMN RESTRICT
- 3.6.1.6.23.
- ALTER TABLE .. DROP COLUMN CASCADE
- 3.6.1.6.24.
- ALTER TABLE .. DROP COLUMNS
- 3.6.1.6.25.
- ALTER TABLE .. ADD COLUMN IF NOT EXISTS
- 3.6.1.6.26.
- ALTER TABLE .. DROP CONSTRAINT
- 3.6.1.6.27.
- ALTER TABLE .. DROP PRIMARY KEY
- 3.6.1.6.28.
- ALTER TABLE .. DROP UNIQUE
- 3.6.1.6.29.
- ALTER TABLE .. DROP FOREIGN KEY
- 3.6.1.6.30.
- ALTER TABLE .. DROP CONSTRAINT IF EXISTS
- 3.6.1.6.31.
- ALTER TABLE IF EXISTS
- 3.6.1.7.
- ALTER TYPE
- 3.6.1.7.1.
- ALTER TYPE .. RENAME
- 3.6.1.7.2.
- ALTER TYPE .. for enum alterations
- 3.6.1.8.
- ALTER VIEW
- 3.6.1.8.1.
- ALTER VIEW .. COMMENT
- 3.6.1.8.2.
- ALTER VIEW .. RENAME
- 3.6.1.8.3.
- ALTER VIEW IF EXISTS
- 3.6.2.
- The COMMENT statement
- 3.6.2.1.
- COMMENT ON TABLE
- 3.6.2.2.
- COMMENT ON VIEW
- 3.6.2.3.
- COMMENT ON COLUMN
- 3.6.3.
- The CREATE statement
- 3.6.3.1.
- CREATE DATABASE
- 3.6.3.2.
- CREATE DOMAIN
- 3.6.3.3.
- CREATE FUNCTION
- 3.6.3.3.1.
- Scalar functions
- 3.6.3.3.2.
- CREATE OR REPLACE FUNCTION
- 3.6.3.3.3.
- SQL data access characteristics
- 3.6.3.3.4.
- DETERMINISTIC characteristic
- 3.6.3.3.5.
- ON NULL INPUT characteristic
- 3.6.3.4.
- CREATE INDEX
- 3.6.3.5.
- CREATE PROCEDURE
- 3.6.3.5.1.
- CREATE OR REPLACE PROCEDURE
- 3.6.3.5.2.
- SQL data access characteristics
- 3.6.3.6.
- CREATE SCHEMA
- 3.6.3.7.
- CREATE SEQUENCE
- 3.6.3.7.1.
- CREATE SEQUENCE IF NOT EXISTS
- 3.6.3.7.2.
- CREATE SEQUENCE .. CACHE
- 3.6.3.7.3.
- CREATE SEQUENCE .. CYCLE
- 3.6.3.7.4.
- CREATE SEQUENCE .. MINVALUE
- 3.6.3.7.5.
- CREATE SEQUENCE .. MAXVALUE
- 3.6.3.7.6.
- CREATE SEQUENCE .. INCREMENT BY
- 3.6.3.7.7.
- CREATE SEQUENCE .. START WITH
- 3.6.3.8.
- CREATE TABLE
- 3.6.3.8.1.
- Columns
- 3.6.3.8.2.
- Nullability
- 3.6.3.8.3.
- Defaults
- 3.6.3.8.4.
- Identities
- 3.6.3.8.5.
- Computed columns (new)
- 3.6.3.8.6.
- Primary key
- 3.6.3.8.7.
- Unique constraints
- 3.6.3.8.8.
- Foreign keys
- 3.6.3.8.9.
- Check constraints
- 3.6.3.8.10.
- From a SELECT
- 3.6.3.8.11.
- Temporary tables
- 3.6.3.9.
- CREATE TRIGGER
- 3.6.3.9.1.
- Events
- 3.6.3.9.2.
- REFERENCING clause
- 3.6.3.9.3.
- STATEMENT vs ROW triggers
- 3.6.3.9.4.
- WHEN clause
- 3.6.3.10.
- CREATE TYPE
- 3.6.3.11.
- CREATE VIEW
- 3.6.3.11.1.
- CREATE OR REPLACE VIEW
- 3.6.3.11.2.
- WITH CHECK OPTION
- 3.6.3.11.3.
- WITH READ ONLY
- 3.6.4.
- The DROP statement
- 3.6.4.1.
- DROP DATABASE
- 3.6.4.1.1.
- DROP DATABASE IF EXISTS
- 3.6.4.2.
- DROP DOMAIN
- 3.6.4.2.1.
- DROP DOMAIN IF EXISTS
- 3.6.4.3.
- DROP FUNCTION
- 3.6.4.3.1.
- DROP FUNCTION IF EXISTS
- 3.6.4.4.
- DROP INDEX
- 3.6.4.4.1.
- DROP INDEX IF EXISTS
- 3.6.4.5.
- DROP PROCEDURE
- 3.6.4.5.1.
- DROP PROCEDURE IF EXISTS
- 3.6.4.6.
- DROP SCHEMA
- 3.6.4.6.1.
- DROP SCHEMA IF EXISTS
- 3.6.4.7.
- DROP SEQUENCE
- 3.6.4.7.1.
- DROP SEQUENCE IF EXISTS
- 3.6.4.8.
- DROP TABLE
- 3.6.4.8.1.
- DROP TABLE IF EXISTS
- 3.6.4.9.
- DROP TRIGGER
- 3.6.4.9.1.
- DROP TRIGGER IF EXISTS
- 3.6.4.10.
- DROP TYPE
- 3.6.4.10.1.
- DROP TYPE IF EXISTS
- 3.6.4.11.
- DROP VIEW
- 3.6.4.11.1.
- DROP VIEW IF EXISTS
- 3.6.5.
- The GRANT statement
- 3.6.6.
- The REVOKE statement
- 3.6.7.
- The SET statement
- 3.6.7.1.
- SET CATALOG
- 3.6.7.2.
- SET SCHEMA
- 3.6.8.
- The TRUNCATE statement
- 3.6.9.
- Generating DDL from objects
- 3.7.
- Procedural statements
- 3.7.1.
- Block statement
- 3.7.2.
- CALL statement
- 3.7.3.
- CONTINUE statement
- 3.7.4.
- EXECUTE statement
- 3.7.5.
- EXIT statement
- 3.7.6.
- FOR statement
- 3.7.7.
- GOTO statement
- 3.7.8.
- IF statement
- 3.7.9.
- Labels
- 3.7.10.
- LOOP statement
- 3.7.11.
- REPEAT statement
- 3.7.12.
- SIGNAL
- 3.7.13.
- Variables
- 3.7.14.
- WHILE statement
- 3.8.
- Catalog and schema expressions
- 3.9.
- Table expressions
- 3.9.1.
- Generated Tables
- 3.9.2.
- Aliased Tables
- 3.9.2.1.
- Aliased generated tables
- 3.9.2.2.
- Aliased table expressions
- 3.9.2.3.
- Derived column lists
- 3.9.2.4.
- Unnamed derived tables
- 3.9.3.
- Joined tables
- 3.9.3.1.
- CROSS JOIN
- 3.9.3.2.
- INNER JOIN
- 3.9.3.3.
- OUTER JOIN
- 3.9.3.4.
- SEMI JOIN
- 3.9.3.5.
- ANTI JOIN
- 3.9.3.6.
- ON clause
- 3.9.3.7.
- ON KEY clause
- 3.9.3.8.
- USING clause
- 3.9.3.9.
- NATURAL clause
- 3.9.3.10.
- LATERAL
- 3.9.3.11.
- APPLY
- 3.9.3.12.
- PARTITION BY
- 3.9.4.
- The VALUES() table constructor
- 3.9.5.
- Derived tables
- 3.9.6.
- Inline derived tables
- 3.9.7.
- The Oracle PIVOT clause
- 3.9.8.
- Relational division
- 3.9.9.
- Array and cursor unnesting
- 3.9.10.
- Table-valued functions
- 3.9.11.
- GENERATE_SERIES
- 3.9.12.
- JSON_TABLE
- 3.9.13.
- XMLTABLE
- 3.9.14.
- The DUAL table
- 3.9.15.
- Temporal tables
- 3.9.16.
- Data change delta tables (new)
- 3.10.
- Column expressions
- 3.10.1.
- Table columns
- 3.10.1.1.
- Generated table columns
- 3.10.1.2.
- Dereferenced table columns
- 3.10.1.3.
- Named table columns
- 3.10.2.
- Aliased columns
- 3.10.3.
- Cast expressions
- 3.10.4.
- Datatype coercions
- 3.10.5.
- Readonly columns (new)
- 3.10.6.
- Computed columns (new)
- 3.10.7.
- Collations
- 3.10.8.
- Arithmetic expressions
- 3.10.9.
- String concatenation
- 3.10.10.
- Case sensitivity with strings
- 3.10.11.
- General functions
- 3.10.11.1.
- CHOOSE
- 3.10.11.2.
- COALESCE
- 3.10.11.3.
- DECODE
- 3.10.11.4.
- IIF
- 3.10.11.5.
- NULLIF
- 3.10.11.6.
- NVL
- 3.10.11.7.
- NVL2
- 3.10.12.
- Numeric functions
- 3.10.12.1.
- ABS
- 3.10.12.2.
- ACOS
- 3.10.12.3.
- ASIN
- 3.10.12.4.
- ATAN
- 3.10.12.5.
- ATAN2
- 3.10.12.6.
- CEIL
- 3.10.12.7.
- COS
- 3.10.12.8.
- COSH
- 3.10.12.9.
- COT
- 3.10.12.10.
- COTH
- 3.10.12.11.
- DEG
- 3.10.12.12.
- E
- 3.10.12.13.
- EXP
- 3.10.12.14.
- FLOOR
- 3.10.12.15.
- GREATEST
- 3.10.12.16.
- LEAST
- 3.10.12.17.
- LN
- 3.10.12.18.
- LOG
- 3.10.12.19.
- LOG10
- 3.10.12.20.
- NEG
- 3.10.12.21.
- PI
- 3.10.12.22.
- POWER
- 3.10.12.23.
- RAD
- 3.10.12.24.
- RAND
- 3.10.12.25.
- ROUND
- 3.10.12.26.
- SIGN
- 3.10.12.27.
- SIN
- 3.10.12.28.
- SINH
- 3.10.12.29.
- SQRT
- 3.10.12.30.
- SQUARE
- 3.10.12.31.
- TAN
- 3.10.12.32.
- TANH
- 3.10.12.33.
- TRUNC
- 3.10.12.34.
- WIDTH_BUCKET
- 3.10.13.
- Bitwise functions
- 3.10.13.1.
- BIT_AND
- 3.10.13.2.
- BIT_COUNT
- 3.10.13.3.
- BIT_NAND
- 3.10.13.4.
- BIT_NOR
- 3.10.13.5.
- BIT_NOT
- 3.10.13.6.
- BIT_OR
- 3.10.13.7.
- BIT_XNOR
- 3.10.13.8.
- BIT_XOR
- 3.10.13.9.
- SHL
- 3.10.13.10.
- SHR
- 3.10.14.
- String functions
- 3.10.14.1.
- ASCII
- 3.10.14.2.
- BIT_LENGTH
- 3.10.14.3.
- CHR
- 3.10.14.4.
- CONCAT (|| operator)
- 3.10.14.5.
- DIGITS
- 3.10.14.6.
- LEFT
- 3.10.14.7.
- LENGTH
- 3.10.14.8.
- LOWER
- 3.10.14.9.
- LPAD
- 3.10.14.10.
- LTRIM
- 3.10.14.11.
- MD5
- 3.10.14.12.
- MID
- 3.10.14.13.
- OCTET_LENGTH
- 3.10.14.14.
- OVERLAY
- 3.10.14.15.
- POSITION
- 3.10.14.16.
- REGEXP_REPLACE
- 3.10.14.17.
- REPEAT
- 3.10.14.18.
- REPLACE
- 3.10.14.19.
- REVERSE
- 3.10.14.20.
- RIGHT
- 3.10.14.21.
- RPAD
- 3.10.14.22.
- RTRIM
- 3.10.14.23.
- SPACE
- 3.10.14.24.
- SPLIT_PART
- 3.10.14.25.
- SUBSTRING
- 3.10.14.26.
- SUBSTRING_INDEX
- 3.10.14.27.
- TO_CHAR
- 3.10.14.28.
- TO_HEX
- 3.10.14.29.
- TRANSLATE
- 3.10.14.30.
- TRIM
- 3.10.14.31.
- UPPER
- 3.10.14.32.
- UUID
- 3.10.15.
- Datetime functions
- 3.10.15.1.
- CENTURY
- 3.10.15.2.
- CURRENT_DATE
- 3.10.15.3.
- CURRENT_LOCALDATE
- 3.10.15.4.
- CURRENT_LOCALDATETIME
- 3.10.15.5.
- CURRENT_LOCALTIME
- 3.10.15.6.
- CURRENT_OFFSETDATETIME
- 3.10.15.7.
- CURRENT_OFFSETTIME
- 3.10.15.8.
- CURRENT_TIME
- 3.10.15.9.
- CURRENT_TIMESTAMP
- 3.10.15.10.
- DATE
- 3.10.15.11.
- DATEADD
- 3.10.15.12.
- DATEDIFF
- 3.10.15.13.
- DATESUB
- 3.10.15.14.
- DAY
- 3.10.15.15.
- DAY_OF_YEAR
- 3.10.15.16.
- DECADE
- 3.10.15.17.
- EPOCH
- 3.10.15.18.
- EXTRACT
- 3.10.15.19.
- HOUR
- 3.10.15.20.
- ISO_DAY_OF_WEEK
- 3.10.15.21.
- LOCALDATE
- 3.10.15.22.
- LOCALDATEADD
- 3.10.15.23.
- LOCALDATESUB
- 3.10.15.24.
- LOCALDATETIME
- 3.10.15.25.
- LOCALDATETIMEADD
- 3.10.15.26.
- LOCALDATETIMESUB
- 3.10.15.27.
- LOCALTIME
- 3.10.15.28.
- MILLENNIUM
- 3.10.15.29.
- MINUTE
- 3.10.15.30.
- MONTH
- 3.10.15.31.
- QUARTER
- 3.10.15.32.
- SECOND
- 3.10.15.33.
- TIME
- 3.10.15.34.
- TIMESTAMP
- 3.10.15.35.
- TIMESTAMPADD
- 3.10.15.36.
- TIMESTAMPSUB
- 3.10.15.37.
- TO_DATE
- 3.10.15.38.
- TO_LOCALDATE
- 3.10.15.39.
- TO_LOCALDATETIME
- 3.10.15.40.
- TO_TIMESTAMP
- 3.10.15.41.
- TRUNC
- 3.10.15.42.
- YEAR
- 3.10.16.
- ARRAY functions
- 3.10.16.1.
- ARRAY_GET
- 3.10.16.2.
- ARRAY constructor
- 3.10.16.3.
- ARRAY constructor from subquery
- 3.10.16.4.
- CARDINALITY
- 3.10.17.
- JSON functions
- 3.10.17.1.
- JSON_ARRAY
- 3.10.17.2.
- JSON_OBJECT
- 3.10.17.3.
- JSON_VALUE
- 3.10.18.
- XML functions
- 3.10.18.1.
- XMLATTRIBUTES
- 3.10.18.2.
- XMLCOMMENT
- 3.10.18.3.
- XMLCONCAT
- 3.10.18.4.
- XMLDOCUMENT
- 3.10.18.5.
- XMLELEMENT
- 3.10.18.6.
- XMLFOREST
- 3.10.18.7.
- XMLPARSE
- 3.10.18.8.
- XMLPI
- 3.10.18.9.
- XMLQUERY
- 3.10.18.10.
- XMLSERIALIZE
- 3.10.19.
- System functions
- 3.10.19.1.
- CURRENT_SCHEMA
- 3.10.19.2.
- CURRENT_USER
- 3.10.20.
- Spatial functions (new)
- 3.10.20.1.
- ST_Area (new)
- 3.10.20.2.
- ST_AsText (new)
- 3.10.20.3.
- ST_Centroid (new)
- 3.10.20.4.
- ST_Difference (new)
- 3.10.20.5.
- ST_Distance (new)
- 3.10.20.6.
- ST_EndPoint (new)
- 3.10.20.7.
- ST_ExteriorRing (new)
- 3.10.20.8.
- ST_GeometryN (new)
- 3.10.20.9.
- ST_GeometryType (new)
- 3.10.20.10.
- ST_GeomFromText (new)
- 3.10.20.11.
- ST_InteriorRingN (new)
- 3.10.20.12.
- ST_Intersection (new)
- 3.10.20.13.
- ST_Length (new)
- 3.10.20.14.
- ST_NumGeometries (new)
- 3.10.20.15.
- ST_NumInteriorRings (new)
- 3.10.20.16.
- ST_NumPoints (new)
- 3.10.20.17.
- ST_PointN (new)
- 3.10.20.18.
- ST_SRID (new)
- 3.10.20.19.
- ST_StartPoint (new)
- 3.10.20.20.
- ST_Union (new)
- 3.10.20.21.
- ST_X (new)
- 3.10.20.22.
- ST_Y (new)
- 3.10.20.23.
- ST_Z (new)
- 3.10.21.
- Aggregate functions
- 3.10.21.1.
- Grouping
- 3.10.21.2.
- Distinctness
- 3.10.21.3.
- Filtering
- 3.10.21.4.
- Ordering
- 3.10.21.5.
- Ordering WITHIN GROUP
- 3.10.21.6.
- Keeping
- 3.10.21.7.
- ANY_VALUE
- 3.10.21.8.
- ARRAY_AGG
- 3.10.21.9.
- AVG
- 3.10.21.10.
- BIT_AND_AGG (new)
- 3.10.21.11.
- BIT_OR_AGG (new)
- 3.10.21.12.
- BIT_XOR_AGG (new)
- 3.10.21.13.
- BOOL_AND
- 3.10.21.14.
- BOOL_OR
- 3.10.21.15.
- COLLECT
- 3.10.21.16.
- COUNT
- 3.10.21.17.
- CUME_DIST
- 3.10.21.18.
- DENSE_RANK
- 3.10.21.19.
- EVERY
- 3.10.21.20.
- GROUP_CONCAT
- 3.10.21.21.
- JSON_ARRAYAGG
- 3.10.21.22.
- JSON_OBJECTAGG
- 3.10.21.23.
- LISTAGG
- 3.10.21.24.
- MAX
- 3.10.21.25.
- MEDIAN
- 3.10.21.26.
- MIN
- 3.10.21.27.
- MODE
- 3.10.21.28.
- MULTISET_AGG
- 3.10.21.29.
- PERCENT_RANK
- 3.10.21.30.
- PERCENTILE_CONT
- 3.10.21.31.
- PERCENTILE_DISC
- 3.10.21.32.
- PRODUCT
- 3.10.21.33.
- RANK
- 3.10.21.34.
- SUM
- 3.10.21.35.
- XMLAGG
- 3.10.22.
- Window functions
- 3.10.22.1.
- PARTITION BY
- 3.10.22.2.
- ORDER BY
- 3.10.22.3.
- ROWS, RANGE, GROUPS (frame clause)
- 3.10.22.4.
- EXCLUDE
- 3.10.22.5.
- NULL treatment
- 3.10.22.6.
- FROM FIRST, FROM LAST
- 3.10.22.7.
- Nested aggregate functions
- 3.10.22.8.
- Window aggregation
- 3.10.22.9.
- Window ordered aggregate
- 3.10.22.10.
- ROW_NUMBER
- 3.10.22.11.
- RANK
- 3.10.22.12.
- DENSE_RANK
- 3.10.22.13.
- PERCENT_RANK
- 3.10.22.14.
- CUME_DIST
- 3.10.22.15.
- NTILE
- 3.10.22.16.
- LEAD
- 3.10.22.17.
- LAG
- 3.10.22.18.
- FIRST_VALUE
- 3.10.22.19.
- LAST_VALUE
- 3.10.22.20.
- NTH_VALUE
- 3.10.23.
- User-defined functions
- 3.10.24.
- User-defined aggregate functions
- 3.10.25.
- The CASE expression
- 3.10.26.
- Sequences and serials
- 3.10.27.
- Scalar subqueries
- 3.10.28.
- ARRAY value constructor
- 3.10.29.
- MULTISET value constructor
- 3.10.30.
- Tuples or row value expressions
- 3.10.31.
- Nested records
- 3.11.
- Conditional expressions
- 3.11.1.
- Condition building
- 3.11.2.
- TRUE and FALSE condition
- 3.11.3.
- BOOLEAN columns
- 3.11.4.
- AND, OR, NOT boolean operators
- 3.11.5.
- Boolean operator precedence
- 3.11.6.
- Comparison predicate
- 3.11.7.
- Comparison predicate (degree > 1)
- 3.11.8.
- Quantified comparison predicate
- 3.11.9.
- BETWEEN predicate
- 3.11.10.
- BETWEEN predicate (degree > 1)
- 3.11.11.
- DISTINCT predicate
- 3.11.12.
- DISTINCT predicate (degree > 1)
- 3.11.13.
- DOCUMENT predicate
- 3.11.14.
- EXISTS predicate
- 3.11.15.
- IN predicate
- 3.11.16.
- IN predicate (degree > 1)
- 3.11.17.
- JSON predicate
- 3.11.18.
- JSON_EXISTS predicate
- 3.11.19.
- LIKE predicate
- 3.11.20.
- Quantified LIKE predicate
- 3.11.21.
- NULL predicate
- 3.11.22.
- NULL predicate (degree > 1)
- 3.11.23.
- OVERLAPS predicate
- 3.11.24.
- SIMILAR TO predicate
- 3.11.25.
- Spatial predicates (new)
- 3.11.25.1.
- ST_Contains (new)
- 3.11.25.2.
- ST_Crosses (new)
- 3.11.25.3.
- ST_Disjoint (new)
- 3.11.25.4.
- ST_Equals (new)
- 3.11.25.5.
- ST_Intersects (new)
- 3.11.25.6.
- ST_IsClosed (new)
- 3.11.25.7.
- ST_IsEmpty (new)
- 3.11.25.8.
- ST_Overlaps (new)
- 3.11.25.9.
- ST_Touches (new)
- 3.11.25.10.
- ST_Within (new)
- 3.11.26.
- UNIQUE predicate
- 3.11.27.
- XMLEXISTS predicate
- 3.11.28.
- Query By Example (QBE)
- 3.12.
- Operator precedence
- 3.13.
- Synthetic SQL clauses
- 3.14.
- Dynamic SQL
- 3.14.1.
- Optional conditional expressions
- 3.15.
- Plain SQL
- 3.16.
- Plain SQL Templating Language
- 3.17.
- Hints
- 3.17.1.
- MySQL hints
- 3.17.1.1.
- Index hints
- 3.17.1.2.
- STRAIGHT_JOIN
- 3.17.1.3.
- Oracle style hints in MySQL
- 3.17.2.
- Oracle hints
- 3.17.3.
- SQL Server hints
- 3.17.3.1.
- WITH
- 3.17.3.2.
- OPTION
- 3.18.
- SQL Parser
- 3.18.1.
- SQL Parser API
- 3.18.2.
- SQL Parser CLI
- 3.18.3.
- SQL Parser Listener
- 3.18.4.
- SQL translator
- 3.18.5.
- SQL Parser Grammar
- 3.19.
- SQL interpreter
- 3.20.
- Schema diff
- 3.21.
- Schema diff CLI
- 3.22.
- Names and identifiers
- 3.23.
- Bind values and parameters
- 3.23.1.
- Indexed parameters
- 3.23.2.
- Named parameters
- 3.23.3.
- Inlined parameters
- 3.23.4.
- SQL injection
- 3.24.
- QueryParts
- 3.24.1.
- SQL rendering
- 3.24.2.
- Declaration vs reference
- 3.24.3.
- Pretty printing SQL
- 3.24.4.
- Variable binding
- 3.24.5.
- Custom data type bindings
- 3.24.6.
- Custom syntax elements
- 3.24.7.
- Plain SQL QueryParts
- 3.24.8.
- Serializability
- 3.24.9.
- SQL transformation
- 3.24.9.1.
- ANSI JOIN to table lists
- 3.24.9.2.
- Table lists to ANSI JOIN
- 3.24.9.3.
- ROWNUM to LIMIT
- 3.24.9.4.
- QUALIFY to derived table
- 3.24.9.5.
- IN condition subquery with LIMIT to derived table
- 3.24.9.6.
- Unnecessary arithmetic expressions
- 3.24.10.
- Custom SQL transformation with VisitListener
- 3.24.10.1.
- Example: Logging abbreviated bind values
- 3.25.
- Zero-based vs one-based APIs
- 3.26.
- SQL building in Kotlin
- 3.26.1.
- Kotlin BOOLEAN value expressions
- 3.26.2.
- Kotlin ARRAY access
- 3.27.
- SQL building in Scala
- 4.
- SQL execution
- 4.1.
- Comparison between jOOQ and JDBC
- 4.2.
- Query vs. ResultQuery
- 4.3.
- Fetching
- 4.3.1.
- Record vs. TableRecord
- 4.3.2.
- Record1 to Record22
- 4.3.3.
- Arrays, Maps and Lists
- 4.3.4.
- ResultQuery as Iterable
- 4.3.5.
- RecordMapper
- 4.3.6.
- POJOs
- 4.3.7.
- RecordMapperProvider
- 4.3.8.
- Ad-hoc Converter
- 4.3.9.
- ConverterProvider
- 4.3.10.
- Lazy fetching
- 4.3.11.
- Lazy fetching with Streams
- 4.3.12.
- Many fetching
- 4.3.13.
- Later fetching
- 4.3.14.
- Reactive Fetching
- 4.3.15.
- ResultSet fetching
- 4.3.16.
- Auto data type conversion
- 4.3.17.
- Custom data type conversion
- 4.4.
- Static statements vs. Prepared Statements
- 4.5.
- Reusing a Query's PreparedStatement
- 4.6.
- JDBC flags
- 4.7.
- Using JDBC batch operations
- 4.8.
- Sequence execution
- 4.9.
- Stored procedures and functions
- 4.9.1.
- Oracle Packages
- 4.9.2.
- Oracle member procedures
- 4.10.
- Exporting to XML, CSV, JSON, HTML, Text, Charts
- 4.10.1.
- Exporting XML
- 4.10.2.
- Exporting CSV
- 4.10.3.
- Exporting JSON
- 4.10.4.
- Exporting HTML
- 4.10.5.
- Exporting Text
- 4.10.6.
- Exporting Charts
- 4.10.7.
- FormattingProvider (new)
- 4.11.
- Importing data
- 4.11.1.
- The Loader API
- 4.11.2.
- Import options
- 4.11.2.1.
- Throttling
- 4.11.2.2.
- Duplicate handling
- 4.11.2.3.
- Error handling
- 4.11.3.
- Import data sources
- 4.11.3.1.
- Importing CSV
- 4.11.3.2.
- Importing JSON
- 4.11.3.3.
- Importing records
- 4.11.3.4.
- Importing arrays
- 4.11.3.5.
- Importing XML
- 4.11.4.
- Import listeners
- 4.11.5.
- Import result and error handling
- 4.12.
- CRUD with UpdatableRecords
- 4.12.1.
- Simple CRUD
- 4.12.2.
- Records' internal flags
- 4.12.3.
- IDENTITY values
- 4.12.4.
- Navigation methods
- 4.12.5.
- Non-updatable records
- 4.12.6.
- Optimistic locking
- 4.12.7.
- Batch execution
- 4.12.8.
- CRUD SPI: RecordListener
- 4.13.
- DAOs
- 4.14.
- Transaction management
- 4.15.
- Exception handling
- 4.16.
- ExecuteListeners
- 4.17.
- Database meta data
- 4.17.1.
- JDBC meta data
- 4.17.2.
- Interpreted meta data
- 4.17.3.
- XML meta data
- 4.17.4.
- Generated meta data
- 4.18.
- JDBC Connection
- 4.19.
- Batched Connection
- 4.20.
- Mocking Connection
- 4.21.
- Mock File Database
- 4.22.
- Parsing Connection
- 4.23.
- Diagnostics
- 4.23.1.
- Too Many Rows
- 4.23.2.
- Too Many Columns
- 4.23.3.
- Duplicate Statements
- 4.23.4.
- Repeated statements
- 4.23.5.
- WasNull calls
- 4.24.
- Logging with LoggerListener
- 4.25.
- Logging Connection
- 4.26.
- Performance considerations
- 4.27.
- Alternative execution models
- 4.27.1.
- Using jOOQ with Spring's JdbcTemplate
- 4.27.2.
- Using jOOQ with JPA
- 4.27.2.1.
- Using jOOQ with JPA Native Query
- 4.27.2.2.
- Using jOOQ with JPA entities
- 4.27.2.3.
- Using jOOQ with JPA EntityResult
- 5.
- Code generation
- 5.1.
- Configuration and setup of the generator
- 5.2.
- Advanced generator configuration
- 5.2.1.
- Logging
- 5.2.2.
- Error handling
- 5.2.3.
- Jdbc
- 5.2.4.
- Generator
- 5.2.5.
- Database
- 5.2.5.1.
- Database name and properties
- 5.2.5.2.
- RegexFlags
- 5.2.5.3.
- Includes and Excludes
- 5.2.5.4.
- Include object types
- 5.2.5.5.
- Record Version and Timestamp Fields
- 5.2.5.6.
- Comments
- 5.2.5.7.
- Synthetic objects
- 5.2.5.7.1.
- Synthetic readonly columns (new)
- 5.2.5.7.2.
- Synthetic readonly ROWIDs (new)
- 5.2.5.7.3.
- Synthetic identities
- 5.2.5.7.4.
- Synthetic primary keys
- 5.2.5.7.5.
- Synthetic unique keys
- 5.2.5.7.6.
- Synthetic foreign keys
- 5.2.5.8.
- Date as timestamp
- 5.2.5.9.
- Ignore procedure return values (deprecated)
- 5.2.5.10.
- Readonly columns (new)
- 5.2.5.11.
- Unsigned types
- 5.2.5.12.
- Catalog and schema mapping
- 5.2.5.13.
- Catalog and schema version providers
- 5.2.5.14.
- Custom ordering of generated code
- 5.2.5.15.
- Forced types
- 5.2.5.15.1.
- Matching of forced types
- 5.2.5.15.2.
- Data type rewriting
- 5.2.5.15.3.
- Qualified converters
- 5.2.5.15.4.
- Inline converters
- 5.2.5.15.5.
- Lambda converters
- 5.2.5.15.6.
- Enum converters
- 5.2.5.15.7.
- Data type bindings
- 5.2.5.16.
- Table valued functions
- 5.2.6.
- Generate
- 5.2.6.1.
- Annotations
- 5.2.6.2.
- Covariant overrides
- 5.2.6.2.1.
- Overriding as()
- 5.2.6.2.2.
- Overriding rename()
- 5.2.6.3.
- Default catalog and schema
- 5.2.6.4.
- Extended types (new)
- 5.2.6.5.
- Fluent setters
- 5.2.6.6.
- Fully Qualified Types
- 5.2.6.7.
- Global Artefacts
- 5.2.6.8.
- Implicit JOIN paths
- 5.2.6.9.
- Java Time Types
- 5.2.6.10.
- Serial Version UID
- 5.2.6.11.
- Sources
- 5.2.6.12.
- Visibility Modifier
- 5.2.6.13.
- Whitespace (newlines and indentation)
- 5.2.6.14.
- Zero Scale Decimal Types
- 5.2.7.
- Output target configuration
- 5.3.
- Custom code generation dependencies
- 5.4.
- Programmatic generator configuration
- 5.5.
- Custom generator strategies
- 5.6.
- Matcher strategies
- 5.6.1.
- MatcherRule
- 5.6.2.
- Matching catalogs
- 5.6.3.
- Matching schemas
- 5.6.4.
- Matching tables
- 5.6.5.
- Matching fields
- 5.6.6.
- Matching routines
- 5.6.7.
- Matching sequences
- 5.6.8.
- Matching enums
- 5.6.9.
- Matching embeddables
- 5.6.10.
- Matcher examples
- 5.7.
- Custom code sections
- 5.8.
- Generated global artefacts
- 5.9.
- Generated tables
- 5.10.
- Generated records
- 5.11.
- Generated POJOs
- 5.12.
- Generated Interfaces
- 5.13.
- Generated DAOs
- 5.14.
- Generated sequences
- 5.15.
- Generated procedures
- 5.16.
- Generated domains
- 5.17.
- Generated UDTs
- 5.18.
- Data type extensions
- 5.18.1.
- PostgreSQL extensions
- 5.19.
- Embeddable types
- 5.19.1.
- Configuration
- 5.19.2.
- Overlapping embeddable types
- 5.19.3.
- Field replacement
- 5.19.4.
- Embedded keys
- 5.19.5.
- Embedded domains
- 5.20.
- Mapping generated catalogs and schemas
- 5.21.
- Code generation for large schemas
- 5.22.
- Code generation and version control
- 5.23.
- JPADatabase: Code generation from entities
- 5.24.
- XMLDatabase: Code generation from XML files
- 5.25.
- DDLDatabase: Code generation from SQL files
- 5.26.
- LiquibaseDatabase: Code generation from Liquibase XML, YAML, JSON files
- 5.27.
- XMLGenerator: Generating XML
- 5.28.
- KotlinGenerator
- 5.29.
- ScalaGenerator
- 5.30.
- Running the code generator with Maven
- 5.31.
- Running the code generator with Ant
- 5.32.
- Running the code generator with Gradle
- 5.33.
- System properties governing code generation
- 5.34.
- Features requiring generated code
- 6.
- Tools
- 6.1.
- API validation using the Checker Framework or Error Prone
- 6.2.
- jOOQ Refaster
- 6.3.
- jOOQ Console
- 7.
- Coming from JPA
- 7.1.
- Set based thinking
- 7.2.
- Database first
- 7.3.
- Eager or lazy loading
- 7.4.
- First level cache and second level cache
- 7.5.
- Embeddable
- 7.6.
- AttributeConverter
- 7.7.
- User types
- 7.8.
- Implicit JOIN
- 7.9.
- @OneToOne or @ManyToOne
- 7.10.
- @OneToMany or @ManyToMany
- 8.
- Reference
- 8.1.
- Supported RDBMS
- 8.2.
- Commercial only features
- 8.3.
- Experimental features
- 8.4.
- Data types
- 8.4.1.
- BLOBs and CLOBs
- 8.4.2.
- BOOLEAN data type
- 8.4.3.
- Unsigned integer types
- 8.4.4.
- INTERVAL data types
- 8.4.5.
- JSON data types
- 8.4.6.
- XML data types
- 8.4.7.
- Spatial data types
- 8.4.8.
- CURSOR data types
- 8.4.9.
- ARRAY and TABLE data types
- 8.4.10.
- Oracle DATE data type
- 8.4.11.
- Domains
- 8.5.
- SQL to DSL mapping rules
- 8.6.
- Quality Assurance
- 8.7.
- Security
- 8.7.1.
- SQL Injection
- 8.7.2.
- Debug logging
- 8.7.3.
- Exception message
- 8.7.4.
- Contact
- 8.8.
- Migrating to jOOQ 3.0
- 8.9.
- Don't do this
- 8.9.1.
- jOOQ: Implementing the DSL types
- 8.9.2.
- jOOQ: Referencing the Step types
- 8.9.3.
- Schema: NULL columns
- 8.9.4.
- Schema: Unnamed constraints
- 8.9.5.
- Schema: Unnecessary surrogate keys
- 8.9.6.
- Schema: Wrong data types
- 8.9.7.
- SQL: COUNT(*) instead of EXISTS()
- 8.9.8.
- SQL: N+1
- 8.9.9.
- SQL: NATURAL JOIN or JOIN USING
- 8.9.10.
- SQL: NOT IN predicate
- 8.9.11.
- SQL: ORDER BY [column index]
- 8.9.12.
- SQL: Rely on implicit ordering
- 8.9.13.
- SQL: SELECT *
- 8.9.14.
- SQL: SELECT DISTINCT
- 8.9.15.
- SQL: Unnecessary UNION instead of UNION ALL
- 8.10.
- The most important jOOQ types
- 8.11.
- Credits
next |
Feedback
Do you have any feedback about this page? We'd love to hear it!