# 2018-04-17 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # # Test cases for UPSERT set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix zipfile do_execsql_test upsert2-100 { CREATE TABLE t1(a INTEGER PRIMARY KEY, b int, c DEFAULT 0); INSERT INTO t1(a,b) VALUES(1,2),(3,4); INSERT INTO t1(a,b) VALUES(1,8),(2,11),(3,1) ON CONFLICT(a) DO UPDATE SET b=excluded.b, c=c+1 WHERE t1.b