Skip to content

Instantly share code, notes, and snippets.

@csalgueiro
Forked from jgdoncel/gist:2635022
Created October 4, 2013 08:49
Show Gist options
  • Save csalgueiro/6822944 to your computer and use it in GitHub Desktop.
Save csalgueiro/6822944 to your computer and use it in GitHub Desktop.
ON DUPLICATE KEY UPDATE
INSERT INTO clientes_peticiones (
id_cliente,fecha,peticiones
) VALUES (
1,'2011-11-02',1
) ON DUPLICATE KEY UPDATE peticiones = peticiones+1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment