Sometimes you just don’t want to do anything if a key already exists in the DB.
mysql> INSERT INTO `table` SET id=5, name=`arthur` ON DUPLICATE KEY UPDATE 0+0;
This entry was posted
on Monday, October 27th, 2008 at 4:27 pm and is filed under MySQL.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Thanks, was looking for this.
INSERT IGNORE INTO `table` SET id=5, name=`arthur`
Mail (will not be published) (required)
Bottomless, Endless is proudly powered by
and Comments (RSS).
© 2007-2014 Bottomless, Inc. All Rights Reserved
Switch to our mobile site