So another thing to know about the insert command is that you can use it to bulk insert data so we can
insert 10 different users at once or we can eventually once we get to it we can update 10 different
users at once or delete 10 or whatever it is.
But for insert the way that it works is that rather than just giving one set of values like Charlie
who is 10.
We just use a comma separated list so we tack on a comma and then we add another one Saidy who's three
and then comma lazy bear who is one note about the column placement does not matter.
You'll see it.
I think what's more logical is actually to put it here at the end of the line.
But often what you see is here I think it makes it easier for you to just visually break things up and
to see hey here's a new line and here's your line but really just a matter of preference.
So don't pay too much attention to that.
Don't pay any attention to that actually.
What's important is that we have a list and we can multiple insert all at once.
So let's try it.
So we have our catch table with blue and Draco we will do an insert into cats and we'll do name followed
by age now we have values and our first pair are first set of values will be.
Oh boy this is the hardest part of teaching this stuff coming up with the fake data.
Let's say peanut
and peanut to and comma could they come.
There doesn't matter.
Let's say the next one will be called butter.
Who is four.
Yes I am looking at a thing of peanut butter in my kitchen right now.
So that's where that comes from.
And lastly let's do.
Sure.
Jelly.
Who is it.
Just like that.
We need our semi-colon to end it.
Now we get something slightly new.
Cleary OK.
Three rows affected.
Awesome.
So to check our work we can just to select a star from cats again and I should be consistent.
It doesn't matter.
But I'll capitalize.
From now we have blue Draco which were there before peanut butter and jelly that turned out nicely and
we inserted them all with one command.
So later on in the course when we start working with some more complicated data what I'll actually do
is give you a file that has an insert statement that will insert let's say 20 different items into a
database 20 rows and you'll be able to run that one line and get kind of starter data that you can use.
It will be an easy way to populate your database with data without having to do it manually 20 times.
OK.
So that's all there is to multiple answers.