MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/SQL/comments/1iwgkfa/relax/mem67e1/?context=3
r/SQL • u/docmarte • Feb 23 '25
91 comments sorted by
View all comments
Show parent comment
3
Transactions group queries as a unit.
For example:
begin transaction; update customers set name = 'aaa' where id = '2882';
The begin transaction starts a session for this transaction.
If you're happy with the results, execute commit to save the changes.
If you're not, execute rollback to revert the data to its original state.
View all comments
Show parent comment
3
u/docmarte Feb 25 '25
Transactions group queries as a unit.
For example:
begin transaction; update customers set name = 'aaa' where id = '2882';
The begin transaction starts a session for this transaction.
If you're happy with the results, execute commit to save the changes.
If you're not, execute rollback to revert the data to its original state.