SQL Dialects Reference/Transactions

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

[edit] Transactions

Start Commit Rollback Prepare Execute prepared
DB2 Implicit COMMIT [ WORK ] ROLLBACK [ WORK ]  ?  ?
SQLite BEGIN [TRANSACTION] COMMIT [TRANSACTION] ROLLBACK [TRANSACTION]  ?  ?
MySQL BEGIN [WORK],
START [TRANSACTION]
 ?  ?
PostgreSQL PREPARE TRANSACTION transaction_id EXECUTE TRANSACTION transaction_id
Firebird Implicit,
SET TRANSACTION
 ?  ?
OpenLink Virtuoso Implicit COMMIT WORK [TRANSACTION] ROLLBACK WORK [TRANSACTION]  ?  ?
Oracle Implicit
  • a COMMIT statement is executed
  • any DDL statement is executed
  • a user disconnects normally
  • a ROLLBACK statement is executed
  • a user process is terminated abnormally
 ?  ?
MSSQL BEGIN TRAN[SACTION] COMMIT [TRAN[SACTION]] ROLLBACK [TRAN[SACTION]]  ?  ?
Linter Implicit
  • a COMMIT statement is executed
  • any DDL statement is executed
  • any statement is executed in AUTOCOMMIT mode
  • a ROLLBACK statement is executed
  • a user process is terminated abnormally or disconnects without COMMIT/ROLLBACK
 ?  ?