Skip to content
masterclass Buddy

PostgreSQL · Command

BEGIN

BEGIN starts a PostgreSQL transaction block. Statements after it run together until COMMIT or ROLLBACK, instead of each statement committing separately.

Last updated

Syntax

BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • COMMIT
  • ROLLBACK
  • START TRANSACTION
  • SAVEPOINT
  • SET TRANSACTION

Source: PostgreSQL: Documentation: 18: BEGIN. Checked 2026-11-03.