INSERT INTO t (t.a, t.b, t.c)
VALUES ('key1','key2','value'), ('key1','key3','value2')
ON DUPLICATE KEY UPDATE
t.c = VALUES(t.c)

http://stackoverflow.com/questions/450682/insert-into-on-duplicate-key-update-for-multiple-items

see http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

- 해당 컬럼에 값이 없으면 insert 있으면 update문 실행 

+ Recent posts