The syntax for Atomic UPSERT is straightforward and self-explanatory, consisting of an UPDATE statement and an INSERT statement separated by an ELSE keyword, as follows:
UPDATE <update-operands> ELSE INSERT <insert-operands>
The <update-operands> and <insert-operands> are operands for regular UPDATE and INSERT SQL statements, respectively.
UPDATE Sales SET ItemCount = ItemCount + 1 WHERE (ItemNbr = 20 AND SaleDate = '05/30/2000') ELSE INSERT INTO Sales (20, '05/30/2000', 1);