Anyone have a resource with some sample code for transaction syntax under MySQL InnoDB? The manual's a little opaque.
Thanks, Eliot
Very simple:
To start a transaction, execute this query: BEGIN WORK;
to end a transaction and rollback: ROLLBACK WORK;
and to commit the changes: COMMIT WORK;
that is all.
Do you have to use the word work? I've just been using BEGIN; ROLLBACK; and COMMIT;
The standard dictates you should use "WORK" but SQL also understands if you leave it off.