1
create table t1 (a int auto_increment primary key, b int, c timestamp);
2
insert into t1 (a, b, c) values (1, 0, '2001-01-01 01:01:01'),
3
(2, 0, '2002-02-02 02:02:02'), (3, 0, '2003-03-03 03:03:03');
4
insert into t1 (a) values (3), (5) on duplicate key update b = 3, c = c;
7
1 0 2001-01-01 01:01:01
8
2 0 2002-02-02 02:02:02
9
3 3 2003-03-03 03:03:03
11
insert into t1 (a, c) values (4, '2004-04-04 00:00:00'),
12
(6, '2006-06-06 06:06:06') on duplicate key update b = 4;
15
1 0 2001-01-01 01:01:01
16
2 0 2002-02-02 02:02:02
17
3 3 2003-03-03 03:03:03
18
4 NULL 2004-04-04 00:00:00
20
6 NULL 2006-06-06 06:06:06