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

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

CRUD: Insert

Supported by ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Calling UpdatableRecord.insert() will execute the same logic as store(), but will enforce the INSERT behaviour regardless if the record was previously fetched from the database or not.

// Create a new record
BookRecord book = create.newRecord(BOOK);

// Insert the record: INSERT INTO BOOK (TITLE) VALUES ('1984');
book.setTitle("1984");
book.insert();
Unlike most other CRUD operations, INSERT does not rely on the presence of a primary key, so it is also available for any other org.jooq.TableRecord.

References to this page

Feedback

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

The jOOQ Logo