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 UPDATE statement
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The UPDATE
statement is used to modify one or several pre-existing records in a database table. UPDATE
statements are only possible on single tables. Support for multi-table updates might be implemented in the future. An example update query is given here:
UPDATE AUTHOR SET FIRST_NAME = 'Hermann', LAST_NAME = 'Hesse' WHERE ID = 3;
create.update(AUTHOR) .set(AUTHOR.FIRST_NAME, "Hermann") .set(AUTHOR.LAST_NAME, "Hesse") .where(AUTHOR.ID.eq(3)) .execute();
The following subsections discuss the various subclauses of the DELETE
statement.
Table of contents
- 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
previous : next |
References to this page
- Readonly column behaviour
- Updatable Primary Keys
- The WITH clause
- INSERT .. DEFAULT VALUES
- Defaults
- WITH CHECK OPTION
- Temporal tables
- Data change delta tables
- Readonly columns
- Tuples or row value expressions
- Conditional expressions
- Policies
- CRUD with UpdatableRecords
- Simple CRUD
- CRUD SPI: RecordListener
- ExecuteListeners
- Logging with SQLExceptionLoggerListener
- Readonly columns
- SQL to DSL mapping rules
Feedback
Do you have any feedback about this page? We'd love to hear it!