Upsert

Upsert

The SQL-like UPSERT statement inserts a record to a table in a database 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 a portmanteau of "update" and "insert" and is common slang among database developers.fact|date=May 2007 The SQL:2003 defines a MERGE statement that provides similar functionality.

Example

IF FOUND THEN UPDATE ELSE INSERT;

ee also

* merge (SQL)

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • upsert — 1. verb To insert rows into a database table (if they do not already exist) or update them (if they do). 2. noun An operation that inserts rows into a database table (if they do not already exist) or updates them (if they do) …   Wiktionary

  • TPump — is a Teradata utility.Teradata TPump – Continuous Data LoadingTeradata TPump is a highly parallel utility designed to continuously move data from data sources into Teradata tables without locking the affected table. TPump provides near real time… …   Wikipedia

  • SQL — This article is about the database language. For the airport with IATA code SQL, see San Carlos Airport. SQL Paradigm(s) Multi paradigm Appeared in 1974 Designed by Donald D. Chamberlin Raymond F. Boyce Developer …   Wikipedia

  • Merge (SQL) — A relational database management system uses SQL MERGE (upsert) statements to INSERT new records or UPDATE existing records depending on whether or not a condition matches. It was officially introduced in the SQL:2008 standard. Contents 1 Usage 2 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”