GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • SS64
  • SQL Server
  • How-to

This view

  • Original page
  • New address

GeezerVison is showing ss64.com — COMMIT - SQL Server

  • SS64
  • SQL Server
  • How-to

COMMIT

Mark the end of a transaction.

Syntax
      COMMIT [ { TRAN | TRANSACTION }
         [ transaction_name | @tran_name_variable ] ]
            [ WITH ( DELAYED_DURABILITY = { OFF | ON } ) ]
               [ ; ]

Syntax for Synapse Data Warehouse in Microsoft Fabric, Azure Synapse Analytics, and Parallel Data Warehouse Database.
syntaxsql

      COMMIT [ TRAN | TRANSACTION ]
         [ ; ]

A commit will make any data modifications performed since the start of the transaction a permanent part of the database.

transaction_name Ignored by the SQL Server Database Engine. transaction_name is used by programmers to associate a BEGIN TRANSACTION statement with a COMMIT TRANSACTION statement. transaction_name must conform to the rules for identifiers, but can't exceed 32 characters.

@tran_name_variable The name of a user-defined variable containing a valid transaction name. The variable must be declared with a char, varchar, nchar, or nvarchar data type. If more than 32 characters are passed to the variable, only 32 characters are used. The remaining characters are truncated.

WITH DELAYED_DURABILITY = { OFF | ON }
Option that requests this transaction should be committed with delayed durability. The request is ignored if the database was altered with DELAYED_DURABILITY = DISABLED or DELAYED_DURABILITY = FORCED.

You can't roll back a transaction after a COMMIT TRANSACTION statement is issued, because the data modifications were made a permanent part of the database.

The syntax COMMIT or COMMIT WORK is compatible with SQL-92.

Examples

COMMIT

“Once a journalist makes a commitment of confidentiality to a source, only the source can end that commitment” ~ Matt Cooper

Related commands

COMMIT TRANSACTION
CHECKPOINT


 
Copyright © 1999-2026 SS64.com
Some rights reserved
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.