Skip to content

Instantly share code, notes, and snippets.

@JohnAmican
Created October 18, 2019 19:39
Show Gist options
  • Save JohnAmican/b92e84a29711d12ba16a071760b40cdd to your computer and use it in GitHub Desktop.
Save JohnAmican/b92e84a29711d12ba16a071760b40cdd to your computer and use it in GitHub Desktop.
BEGIN;
UPDATE trades SET latest = false where root_id = 'foo' AND version = 5;
INSERT INTO trades (latest, root_id, version) VALUES (true, 'foo', 6);
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment