FireDAC Components for Zoho CRM

Build 22.0.8462

UPSERT Statements

An UPSERT statement updates an existing record or creates a new record if an existing record is not identified.

UPSERT Syntax

The UPSERT syntax is the same as for insert. Zoho CRM uses the input provided in the VALUES clause to determine whether the record already exists. If the record does not exist, all columns required to insert the record must be specified. See Data Model for any table-specific information.

UPSERT INTO <table_name> 
( <column_reference> [ , ... ] )
VALUES 
( { <expression> | NULL } [ , ... ] ) 
  

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>

The following is an example query:

UPSERT INTO Accounts (AccountNumber) VALUES ('4501')

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462