github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/dml/replace/replace.result (about) 1 drop table if exists names; 2 create table names(id int PRIMARY KEY,name VARCHAR(255),age int); 3 replace into names(id, name, age) values(1,"Abby", 24); 4 select name, age from names where id = 1; 5 name age 6 Abby 24 7 replace into names(id, name, age) values(1,"Bobby", 25); 8 select name, age from names where id = 1; 9 name age 10 Bobby 25 11 replace into names set id = 2, name = "Ciro"; 12 select name, age from names where id = 2; 13 name age 14 Ciro null 15 replace into names set id = 2, name = "Ciro", age = 17; 16 select name, age from names where id = 2; 17 name age 18 Ciro 17 19 REPLACE INTO names values (2, "Bob", 19); 20 select name, age from names where id = 2; 21 name age 22 Bob 19 23 drop table if exists t1; 24 create table t1(a int, b int, c int); 25 insert into t1 values (1,1,1), (2,2,2), (3,3,3); 26 replace t1 values (1,2,3), (2,3,4); 27 select a, b, c from t1; 28 a b c 29 1 1 1 30 2 2 2 31 3 3 3 32 1 2 3 33 2 3 4 34 create table t4 (a int unique key, b varchar(64)); 35 replace into t4 values (1, 'a'); 36 select * from t4; 37 a b 38 1 a 39 replace into t4 values (1, 'b'); 40 select * from t4; 41 a b 42 1 b