BEGIN TRANSACTION starts a transaction and COMMIT ends it. You could try these in your SQL, everything must be done in the same session though.