Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
When seeding or populating a database for the first time, you will have lots of data to add. But what happens when there's an error in the middle of that process?
Definitions
Autocommit - every statement you write gets saved to disk.
Seeding - populating a database for the first time.
Script file - a file containing SQL statements.
SQL Used
Switch autocommit off and begin a transaction:
BEGIN TRANSACTION;
Or simply:
BEGIN;
To save all results of the statements after the start of the transaction to disk:
COMMIT;
See all of the SQL used in Modifying Data With SQL in the Modifying Data With SQL Cheatsheet.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up