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
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,INSERTdoes not rely on the presence of a primary key, so it is also available for any otherorg.jooq.TableRecord.
Feedback
Do you have any feedback about this page? We'd love to hear it!