This example uses dynamically supplied values for an employee table row to update the table if the data matches an existing employee or insert the new row into the table if the data does not match an existing employee. Column empno is the unique primary index for the employee table.
This example can also be coded as the following upsert form of the UPDATE statement. See UPDATE (Upsert Form).
USING (empno INTEGER, name VARCHAR(50), salary INTEGER) UPDATE employee SET salary=:salary WHERE empno=:empno ELSE INSERT INTO employee (empno, name, salary) VALUES ( :empno, :name, :salary);