Lets think of a situation: where you have to bulk insert,
but there might be some data which is already there in the db, and you just want to modify it.
In such cases, something like the following query will help you.InsertThe key is to use the clause "On Duplicate Key Update"
Into t1 (id,val1,va2)
On Duplicate Key Update
val1= val1+ values(val1),
val2= val2 + values(val2)