Consider the following table(T) in mysql.
id c1 c2
1 10 100
2 20 200
3 30 300
Suppose I want to update "c1" of the row with id=2. I can do the following.
UPDATE T set col1=20 where id=1;
Suppose I want bulk update.
INSERT INTO T(id,c1) VALUES (1,20),(2,40) ON DUPLICATE KEY UPDATE c1=VALUES(c1);
But this will give you an error if default value for "c2" is not set in the SCHEMA.
Is there another way to achieve the task?