Begin work (SQL): Difference between revisions

Content deleted Content added
moved to sql:statements
execute requested merge (no, I can't submit edits to multiple articles atomically)
 
(6 intermediate revisions by 5 users not shown)
Line 1:
#REDIRECT [[Database transaction]]
A <code>BEGIN WORK</code> statement in [[SQL]] starts a [[database transaction|transaction]] within a [[relational database management system]] (RDBMS).
 
Any work done after this point will not be visible to other users, until a <code>[[Commit (SQL)|COMMIT]]</code> statement is issued. A <code>[[Rollback (data management)|ROLLBACK]]</code> statement can also be issued, which will undo any work performed since the <code>BEGIN WORK</code> command. Both <code>COMMIT</code> and <code>ROLLBACK</code> will end the transaction: another <code>BEGIN WORK</code> will need to be issued to start a new one.
 
Some database systems allow the synonyms <code>BEGIN</code> and <code>BEGIN TRANSACTION</code>, and may have other
options available.
 
[[Category:SQL statements]]