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
Start a free Courses trial
to watch this video
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 upRelated 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