INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) RETURNING a, b, c;

INSERT INTO t1
SELECT * FROM (SELECT c, c+d AS e FROM t2) AS dt RETURNING a, b, c;

INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS t2
ON DUPLICATE KEY UPDATE c = t2.a+t2.b
RETURNING a, b, c;

INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS t2
ON DUPLICATE KEY UPDATE a = VALUES(a), b = VALUES(b)
RETURNING a, b, c;

INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS t2(m,n,p)
ON DUPLICATE KEY UPDATE c = m+n
RETURNING a, b, c;

INSERT INTO t1
SELECT * FROM (SELECT c, c+d AS e FROM t2) AS dt
ON DUPLICATE KEY UPDATE b = e
RETURNING a, b, c;

INSERT INTO t1
SELECT * FROM (SELECT c, c+d AS e FROM t2)
ON DUPLICATE KEY UPDATE b = e
RETURNING a, b, c;

INSERT INTO t1 SET a=1,b=2,c=3 AS t2
ON DUPLICATE KEY UPDATE c = t2.a+t2.b
RETURNING a, b, c;

INSERT INTO t1 SET a=1,b=2,c=3 AS t2(m,n,p)
ON DUPLICATE KEY UPDATE c = m+n, b = n+p
RETURNING a, b, c;
