FIND YOUR NEXT FEW LINES

Results for “transaction”

Small, practical examples. Search by task or narrow things down below.

46 snippets foundClear filters
SQLiteSchema design & transactions

Undo a multi-row transfer atomically

SQLite: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.

SQLite✓ Tested
SQLSchema design & transactions

Undo only the work after a savepoint

SQL: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQL✓ Tested
SQL ServerSchema design & transactions

Undo only the work after a savepoint

SQL Server: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQL Server✓ Tested
PostgresSchema design & transactions

Undo only the work after a savepoint

Postgres: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

Postgres✓ Tested
SQLiteSchema design & transactions

Undo only the work after a savepoint

SQLite: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.

SQLite✓ Tested
SQL ServerTransactions & tables

Catch a T-SQL error

Handle an expected conversion error in TRY/CATCH.

TRY CATCH✓ Tested
SQLiteTables & writes

Enable and use foreign keys

Turn on relationship enforcement for the connection.

foreign keys✓ Tested
SQL ServerTransactions & tables

Generate a bounded sequence recursively

Use a recursive CTE with a recursion limit.

recursive CTE✓ Tested
SQL ServerTransactions & tables

Use a session-scoped temporary table

Store intermediate rows in a local # table.

temporary table✓ Tested
SQL ServerTransactions & tables

Use a small table variable

Declare rows for a short batch.

table variable✓ Tested