I will call you back again to unlock the lecture in MySQL.
And in this lecture we go ahead and learn how to insert our rows into our table.
Now let's go ahead and uh, first of all select a table so we can be able to see what our what we are
going to insert.
So we want to select all from the students table.
So go ahead and run this.
Let's check it out.
So we're going to be inserting the students ID the first name the last name GP and a row date.
So the reason why I put in this distance is for us to go ahead and know your dream.
So I put this out so I can be able to see the data we are going to insert.
Now I can go ahead and play this query and then go ahead and say insert.
And our grid is such that into the students table students.
And then we're going to insert values and the values are going to impute.
The first one is the student ID which is one, and the name of the student, which is a first name be
equal to Peter.
And the last name is going to be George.
And the ID is going to be 3.5.
And the date is going to start with a, it's going to start with the year, let's say 2090.
Then it's going to be the month.
And the next one is the date the day.
All right.
So go ahead and put a semicolon at the end.
Now what to populate these to print that out as well.
So go ahead and say select all from students.
And after a semicolon at the end.
Now let's go ahead and execute this and take it out.
So you can see that we have uh this we have this is the first ID is a string ID and the first name is
Peter and the last name is George.
The GPA is 3.5 00A row.
Date is a 2019 zero two by zero six.
So you can actually reduce the three decimal place, maybe like two decimal place to 3.51 or anything.
Okay.
How about is cool.
I can make it to be anything you want.
So you can go ahead and add just this.
So this we can comfortably do on your own.
So in this way you can be able to insert just a a rule.
Now let's go ahead and insert multiple rules.
Because I've inserted this very first one.
We're not going to repeat it again because if you try to repeat it it's going to insert that again.
Now we're going to go back here and I'm going to delete whatever I have right in here.
Then let's go over and.
Create these I want to set maybe a niche up to seven.
So I'll go ahead and put the comma.
I put a comma again.
Then I'll, I'll do this with a comma.
So the next one with a comma and this is 2345 with a comma.
So I've added the first one which is this the id 23456 and seven.
So I'll drag this down so that we can be able to see what is going on right in here.
So now I'm going to give in the next one which is two.
So and let the name be Oscar.
Go ahead and close this.
And then that is the first name with a comma.
And the next one is the last name which is zero.
And then a GPA of 4.7.
And the A is going to be 2092.
And then.
Let's see.
44.
All right.
So we're just adding everything here.
And then the next ID is three.
The next ID is four.
The next ID is five.
The next ID is six and seven.
So I'm sure knows how to draw these.
So it should be faster for us.
And then we can put their first names.
Let me say Barack.
Then the next one, their first name is a Sarah.
So the next one, first name is a mike.
So the next one, first name is a queen.
Then we have the next first name to be Zendaya.
All right, now, where's the last names?
So the last name of Barack is are Harry.
Then for Sarah.
The last name of Sarah is Rocky.
Then for Mike, the last name of Mike is a something.
Then.
For Queen, the last name is Smith.
And then for Zander, the last name is Grace.
And now let's go ahead and add a GPS system said.
Next GPS is going to be 3.7.
And uh.
The next GPS is a 4.8.
Then the next GPS is 2.9.
Then the next GPS is 3.8.
And then the last GPS for grace is 1.0.
All right.
Now let's go ahead and add the years of being roommates, then the next one is 2092, then zero seven.
Okay, we'll have 2092 already.
Let's make this set.
They can be descending.
No problem.
All right.
So and I'm going to give this exactly the same date so we can have this say 2091 1118.
All right.
So let's go ahead and give the next one to be 20.
2097.
And let's just imagine that to be 1118.
And there are the next one we have is a 2099 on 12.
And first then the last one we have here is a.
pointy.
It's it's
0603.
So have never to add our days.
And I believe we don't have any problem anywhere.
The score hadn't been executed.
This.
And check it out.
So it says under here that, uh, a row a row at a row for MySQL cannot know what is the problem.
All right.
So what actually happened is that this is day.
So this can be 118 because we don't have date more than 80 or thirty-firsts.
All right.
So that is what it says.
Incorrect dates 118.
All right.
Now let's go ahead and check it out.
And we are now able to create this.
And uh let's check this out.
Let's drag this up a little and we have all these.
Well you can see that every two big difference ID the first name, the last name, the GP, the enroll
date.
And you can see the first one we is better and it's showing right in there.
And have Oscar.
We have Q we have Barack, we have Sarah, we have Mike, we have Queen and Zendaya.
Okay, that is cool.
Now, that is an interesting stuff to do and I hope you enjoy that.
And let's go ahead and see.
I want to collect these.
I'm going to remove whatever I have right in here.
And now I have only the select that is remaining right in there.
And I want to insert in another data.
And it's going to be incomplete at this time I'm going to say insert.
So insert into students and the value you want to insert this guy.
And I say.
So values and uh let's go ahead and just add only the ID.
And then we'll go ahead and give the first name to be.
doxing and lets the last name be Zimba.
All right, now we have this.
And what?
Insert this into this place and we don't get in the jeep and the inroad date.
Now go ahead and do this and check it out.
So down here you can see error column count doesn't match value count at one because we are unable to
add the Jeep and the the erode dates.
So how can we be able to do this if we want if we want to actually add this.
So go over here and say insert into students and you have to give state where you want to insert that.
So go ahead and say insert into students.
Scientists start their student ID and uh that is students underscore ID.
Then the next one I'm going to insert first underscore name and then the next one is a last underscore
name.
All right.
Cool.
So let's go ahead and change this name.
Let me call this to be judge.
And let me call this to be Steve.
All right.
So that's cool.
Now go ahead and execute this and let's see what happens.
So now here you can see that is cool.
I'm now I can drag this up so you can see what happens right here.
So Judge Steve and the GP is now an enrollment date is no.
So we can now build and set the values with an incomplete, uh, columns.
So how about is cool.
So I pull it down.
Now run with it and I check it out.
So if you have any questions on this please go ahead and use the question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.