Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Video Player
00:00
00:00
00:00
- 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
In this video, we'll review all the ways you can insert data.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Ronnie Sokha
941 Points"Insert a Review" exercise on SQL Playground - Practice: Adding Data Practice Session
Posted by Ronnie SokhaRonnie Sokha
941 Points2 Answers
-
John Grillo
30,241 PointsSQL, NULL's and auto-increment -- is typing 'null' necessary?
Posted by John GrilloJohn Grillo
30,241 Points5 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Great, you can now insert
data into a database table.
0:00
Let's quickly review the ways
you've seen it done.
0:04
To create a row use the INSERT INTO
keywords, followed by the table name,
0:07
followed by the VALUES keyword,
then the values in parentheses.
0:12
This is good if you want to
insert data into all columns.
0:17
Remember you can use NULL in your ID
column to trigger the auto increment.
0:20
Alternatively, if you're not filling in
all of the columns with your own values,
0:25
specify a set of column names between
the table name and the values keyword.
0:31
The ordering of the columns and
the values must match.
0:36
Finally, if you want to add in
multiple rows in the same statement,
0:39
separate each row's set
of values with a comma.
0:44
Like with all SQL statements,
this statement can be multi line too.
0:47
Now it's your time for you to practice
a little more in this SQL playground.
0:52
In here, we've got a movies table,
an actors table, and a reviews table.
0:56
I've tasked you to insert some
more data into these tables.
1:05
Check out the comments in each area for
what you need to do.
1:11
What are you waiting for?
1:14
Get to it.
1:15
Once you're done practicing,
head over to the next assessment step and
1:16
we'll take it from there.
1:20
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