Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases Modifying Data with SQL Handling Errors When Manipulating Data Introduction to Transactions

Sql Transactions?

After committing to a database does the 'transaction block' get executed line by line or not. If yes then there would be no difference between a script which gets too executed line by line in a block (the script itself)

1 Answer

ivana kantnerova
ivana kantnerova
15,932 Points

the difference is when the script is interrupted we will not be able to return the changes that have already been made but the transaction has a special feature (atomicity - it will be done all or nothing). that means that all the instructions that have been executed will be returned and we can start again (without losing the data)