Skip to content

Instantly share code, notes, and snippets.

@peisenhower
Created August 31, 2017 19:22
Show Gist options
  • Save peisenhower/e95a3170ff9830e4fa5ad00b98c8920b to your computer and use it in GitHub Desktop.
Save peisenhower/e95a3170ff9830e4fa5ad00b98c8920b to your computer and use it in GitHub Desktop.
mysql transaction and rollback to test database modifications
BEGIN;
INSERT INTO teams
(name, uuid)
VALUES
('inner-transaction', UNHEX(REPLACE(UUID(), '-','')));
select * from teams;
ROLLBACK;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment