# Transactions

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: Transactions
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/transactions
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/transactions.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/transactions.adoc
description: Redpanda SQL accepts transaction syntax for compatibility with tools that require it, but queries execute immediately with no transactional guarantees.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/transactions.md -->

Redpanda SQL accepts transaction syntax for compatibility with tools that require it. However, queries execute immediately, and Redpanda SQL provides no transactional guarantees.

## [](#commands)Commands

Use the following commands to manage transactions:

### [](#begin)BEGIN

Initiates a new transaction by calling one of the following.

BEGIN

```sql
BEGIN;
```

BEGIN TRANSACTION

```sql
BEGIN TRANSACTION;
```

### [](#commit)COMMIT

Saves the changes made in a transaction to the database and ends the transaction.

Call one of the following.

COMMIT

```sql
COMMIT;
```

END TRANSACTION

```sql
END TRANSACTION;
```

### [](#rollback)ROLLBACK

In Redpanda SQL, when you issue a ROLLBACK command, it does not undo changes made in the current transaction. It finishes the transaction without any rollback action.

```sql
ROLLBACK;
```

## [](#examples)Examples

1.  Define a table named `products` with columns: `product_name`, `price`, and `stock_quantity`.

    ```sql
    CREATE TABLE productsnew(
        product_name TEXT,
        price INT,
        stock_quantity INT
    );
    ```

    Upon successful creation, you get the following output.

    ```sql
    CREATE
    ```

2.  Next, insert product data into the `products` table.


> 📝 **NOTE**
>
> -   Transactions can only contain either multiple `SELECT` statements or a single non-SELECT one
>
> -   The `INSERT` statement is executed immediately without waiting for the transaction to finish or a `COMMIT` to be issued

```sql
BEGIN;
INSERT INTO productsnew(product_name, price, stock_quantity) VALUES ('Tab', 8000, 20);
```

This returns the following output:

```sql
BEGIN
INSERT 0 1
```

1.  View the changes by displaying the products table:

    ```sql
    SELECT * FROM productsnew;
    COMMIT;
    ```

    The product data is now added to the table.

    ```sql
     product_name | price | stock_quantity
    --------------+-------+----------------
     Tab          |  8000 |             20
    (1 row)

    COMMIT
    ```