# START TRANSACTION / BEGIN

Use `START TRANSACTION` or `BEGIN` to start an explicit transaction. Finish its data changes with `COMMIT` or `ROLLBACK`.

## Syntax

```sql
START TRANSACTION;
BEGIN;
```

## Example

Run this example on the same client connection in a test database you own. It creates a test table and removes it afterwards.

```sql
CREATE TABLE txn_example (id INT PRIMARY KEY);
START TRANSACTION;
INSERT INTO txn_example VALUES (1);
ROLLBACK;
SELECT COUNT(*) FROM txn_example;
DROP TABLE txn_example;
```

The count after rollback is 0.

See [Transactions](index.md) and [INSERT](../Data-Manipulation-Language/insert.md).
