Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
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 up-
Jesse Dispoto
Front End Web Development Techdegree Graduate 14,538 Points1 Answer
-
Hakim Rachidi
38,491 Points1 Answer
-
joshua inyang
948 Points2 Answers
-
PLUS
Shubham Mishra
Courses Plus Student 805 Points1 Answer
-
Derek Lin
1,563 Points2 Answers
-
Rastko Jovic
14,883 Points1 Answer
View all discussions for this video
Related 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