What does upsert mean?
In databases & SQL, upsert means to insert a row if it does not exist yet, or update it if it already does, in a single operation.
Databases & SQL vocabulary · SQL Statements and Queries
The word combines 'update' and 'insert'.
In Turkish: varsa güncelleyip yoksa eklemek, upsert etmek
Also used in: Software Engineering
Type at least 2 characters to search all fields.
How it is used
Also a noun: 'do an upsert'. Syntax differs: INSERT ... ON CONFLICT DO UPDATE in PostgreSQL and SQLite, INSERT ... ON DUPLICATE KEY UPDATE in MySQL, and MERGE in SQL Server and Oracle. It needs a unique key to decide whether the row exists.
Example sentences
The sync job upserts products by SKU, so running it twice is safe.
Use an upsert instead of checking first and then inserting; that check can race.
Common collocations
- upsert a row
- ON CONFLICT DO UPDATE
- MERGE statement
- upsert by key
Related terms
More terms: SQL Statements and Queries
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
