use mysql; --disable_warnings drop table if exists t1, t1_part1, t1_part2; --enable_warnings create table t1_part1 ( a int primary key, b varchar(30) ) ENGINE = MYISAM ; create table t1_part2 ( a int primary key, b varchar(30) ) ENGINE = MYISAM ; create table t1 ( a int primary key, b varchar(30), index(a) ) ENGINE = MERGE UNION=(t1_part1,t1_part2) INSERT_METHOD=FIRST; commit ; insert into t1 values(6, 'six' ); # the second insert fails, because the first column is primary key --error 1062 insert into t1 values(6, NULL ); select a,b from t1 ; insert into t1 set a=6, b='sechs' on duplicate key update a=a + 1, b='modified' ; select a,b from t1 ;