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

SQL Statements (DML)

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

jOOQ currently supports 5 types of SQL statements. All of these statements are constructed from a DSLContext instance with an optional JDBC Connection or DataSource. If supplied with a Connection or DataSource, they can be executed. Depending on the query type, executed queries can return results.

Table of contents

3.3.1.
jOOQ's DSL and model API
3.3.2.
The WITH clause
3.3.3.
The WITH RECURSIVE clause
3.3.4.
The SELECT statement
3.3.4.1.
SELECT clause
3.3.4.1.1.
Projection type safety
3.3.4.1.2.
SelectField
3.3.4.1.3.
SELECT *
3.3.4.1.4.
SELECT * EXCEPT (...)
3.3.4.1.5.
SELECT DISTINCT
3.3.4.1.6.
SELECT DISTINCT ON
3.3.4.1.7.
Convenience methods
3.3.4.2.
FROM clause
3.3.4.3.
JOIN operator
3.3.4.4.
Implicit path JOIN
3.3.4.5.
WHERE clause
3.3.4.6.
CONNECT BY clause
3.3.4.7.
GROUP BY clause
3.3.4.7.1.
GROUP BY columns
3.3.4.7.2.
GROUP BY ROLLUP
3.3.4.7.3.
GROUP BY CUBE
3.3.4.7.4.
GROUP BY GROUPING SETS
3.3.4.7.5.
GROUP BY empty grouping set
3.3.4.8.
HAVING clause
3.3.4.9.
WINDOW clauseWINDOW clause
3.3.4.10.
QUALIFY clause
3.3.4.11.
ORDER BY clause
3.3.4.11.1.
Ordering by field index
3.3.4.11.2.
Ordering and NULLS
3.3.4.11.3.
Ordering using CASE expressions
3.3.4.11.4.
Oracle's ORDER SIBLINGS BY clause
3.3.4.12.
LIMIT .. OFFSET clause
3.3.4.13.
WITH TIES clause
3.3.4.14.
SEEK clause
3.3.4.15.
FOR clause (new)
3.3.4.16.
FOR UPDATE clause
3.3.4.17.
Set operations
3.3.4.17.1.
Type safety
3.3.4.17.2.
Projection rowtype
3.3.4.17.3.
Differences to standard SQL
3.3.4.17.4.
UNION
3.3.4.17.5.
INTERSECT
3.3.4.17.6.
EXCEPT
3.3.4.18.
Lexical and logical SELECT clause order
3.3.5.
The INSERT statement
3.3.5.1.
INSERT .. VALUES
3.3.5.2.
INSERT .. DEFAULT VALUES
3.3.5.3.
INSERT .. SET
3.3.5.4.
INSERT .. SELECT
3.3.5.5.
INSERT .. ON DUPLICATE KEY UPDATE
3.3.5.6.
INSERT .. ON DUPLICATE KEY IGNORE
3.3.5.7.
INSERT .. ON CONFLICT
3.3.5.8.
INSERT .. RETURNING
3.3.6.
The UPDATE statement
3.3.6.1.
UPDATE .. SET
3.3.6.2.
UPDATE .. SET ROW
3.3.6.3.
UPDATE .. FROM
3.3.6.4.
UPDATE .. WHERE
3.3.6.5.
UPDATE .. ORDER BY .. LIMIT
3.3.6.6.
UPDATE .. RETURNING
3.3.7.
The DELETE statement
3.3.7.1.
DELETE .. USING
3.3.7.2.
DELETE .. WHERE
3.3.7.3.
DELETE .. ORDER BY .. LIMIT
3.3.7.4.
UPDATE .. RETURNING
3.3.8.
The MERGE statement

previous : next

Feedback

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

The jOOQ Logo