- Upsert
The
SQL -like UPSERT statement inserts a record to a table in adatabase if the record does not exist; if the record already exists, an update operation is performed. This is not a standard SQL statement, but it is frequently used to abbreviate the equivalent pseudo-code.fact|date=May 2007 The term "upsert" is aportmanteau of "update" and "insert" and is common slang among database developers.fact|date=May 2007 The SQL:2003 defines aMERGE
statement that provides similar functionality.Example
IF FOUND THEN UPDATE ELSE INSERT;
ee also
*
merge (SQL) References
Wikimedia Foundation. 2010.