v.22.7Experimental Feature

Adds implicit_transaction Setting for Automatic Query Transactions

Adds new setting implicit_transaction to run standalone queries inside a transaction. It handles both creation and closing (via COMMIT if the query succeeded or ROLLBACK if it didn't) of the transaction automatically. #38344 (Raúl Marín).
Adds the implicit_transaction setting to automatically wrap standalone queries in a transaction, managing transaction start and end (commit or rollback) transparently.

Why it matters

This feature simplifies transactional control by automatically starting a transaction for a standalone query and committing it if the query succeeds or rolling back if it fails. It eliminates the need for manual transaction management, reducing errors and improving reliability for queries requiring atomicity.

How to use it

Enable the feature by setting the implicit_transaction setting to 1 before executing a query. ClickHouse will then automatically handle transaction begin and commit/rollback for that query without explicit transaction control statements.