INSERT query

The SQL INSERT INTO query is used to insert new data records into a database table.

Query example in SQL and QueryDSL syntax:

SQL

executeStatement("INSERT INTO eu (country, capital) VALUES ('Croatia', 'Zagreb')");

QueryDSL

insertInto(eu)
    .columns(eu.country
, eu.capital)
    .values(
"Croatia""Zagreb")
    .execute();