... [where <cond>]" // returns array of values)oRemoteServer:Upsert( cTable, nil, aData ) In addition to INSERT and UPDATE, MySql provides UPSERT: To insert if the primary key is not found and update if the primary is found, We can do UPSERT using either of the methods: oCn:Upsert( ...