mysql - Both “INSERT IGNORE” and “… ON DUPLICATE KEY UPDATE” what happens? -


what mysql both insert ignore , … on duplicate key update ?

this not question differences. ask because talend etl behind ui , i'm worried have side effects if don't want update , this:

string insertignore_tmysqloutput_10 = "insert ignore `" + "employees" + "` (`name`,`jobtitle`) values (?,?) on duplicate key update `name` = ?"; 

ignore acts kind of error-suppressor, making fatal errors act warnings instead.

on duplicate key update doesn't trigger error, ingore has no effect on it.

therefore, ignore has no effect on duplicate keys when on duplicate key update used well. however, if different error occur ignore indeed have effect.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -