WEBVTT

00:07.520 --> 00:10.100
I will call you back again to unlock the lecture in MySQL.

00:10.100 --> 00:16.010
And in this lecture we go ahead and learn how to insert our rows into our table.

00:16.040 --> 00:22.220
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

00:22.220 --> 00:23.000
going to insert.

00:23.000 --> 00:28.250
So we want to select all from the students table.

00:29.360 --> 00:32.270
So go ahead and run this.

00:32.270 --> 00:33.080
Let's check it out.

00:33.080 --> 00:38.390
So we're going to be inserting the students ID the first name the last name GP and a row date.

00:38.390 --> 00:43.160
So the reason why I put in this distance is for us to go ahead and know your dream.

00:43.160 --> 00:47.240
So I put this out so I can be able to see the data we are going to insert.

00:47.270 --> 00:53.600
Now I can go ahead and play this query and then go ahead and say insert.

00:54.830 --> 01:01.160
And our grid is such that into the students table students.

01:01.160 --> 01:05.940
And then we're going to insert values and the values are going to impute.

01:05.970 --> 01:12.030
The first one is the student ID which is one, and the name of the student, which is a first name be

01:12.060 --> 01:13.560
equal to Peter.

01:13.560 --> 01:18.360
And the last name is going to be George.

01:18.690 --> 01:23.340
And the ID is going to be 3.5.

01:23.850 --> 01:32.160
And the date is going to start with a, it's going to start with the year, let's say 2090.

01:32.190 --> 01:35.460
Then it's going to be the month.

01:35.460 --> 01:38.790
And the next one is the date the day.

01:38.820 --> 01:39.300
All right.

01:39.330 --> 01:42.480
So go ahead and put a semicolon at the end.

01:42.510 --> 01:45.660
Now what to populate these to print that out as well.

01:45.660 --> 01:52.950
So go ahead and say select all from students.

01:52.950 --> 01:54.540
And after a semicolon at the end.

01:54.570 --> 01:57.270
Now let's go ahead and execute this and take it out.

01:57.270 --> 02:07.520
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

02:07.520 --> 02:10.100
Peter and the last name is George.

02:10.130 --> 02:13.340
The GPA is 3.5 00A row.

02:13.340 --> 02:18.350
Date is a 2019 zero two by zero six.

02:18.350 --> 02:24.590
So you can actually reduce the three decimal place, maybe like two decimal place to 3.51 or anything.

02:24.740 --> 02:25.160
Okay.

02:25.190 --> 02:26.270
How about is cool.

02:26.300 --> 02:28.520
I can make it to be anything you want.

02:28.520 --> 02:30.110
So you can go ahead and add just this.

02:30.110 --> 02:32.570
So this we can comfortably do on your own.

02:32.570 --> 02:37.430
So in this way you can be able to insert just a a rule.

02:37.460 --> 02:40.550
Now let's go ahead and insert multiple rules.

02:40.550 --> 02:42.440
Because I've inserted this very first one.

02:42.440 --> 02:47.420
We're not going to repeat it again because if you try to repeat it it's going to insert that again.

02:47.420 --> 02:52.280
Now we're going to go back here and I'm going to delete whatever I have right in here.

02:52.310 --> 02:55.460
Then let's go over and.

02:57.530 --> 03:05.000
Create these I want to set maybe a niche up to seven.

03:05.000 --> 03:06.680
So I'll go ahead and put the comma.

03:07.970 --> 03:09.410
I put a comma again.

03:09.440 --> 03:13.160
Then I'll, I'll do this with a comma.

03:13.760 --> 03:21.680
So the next one with a comma and this is 2345 with a comma.

03:23.990 --> 03:30.260
So I've added the first one which is this the id 23456 and seven.

03:30.260 --> 03:34.610
So I'll drag this down so that we can be able to see what is going on right in here.

03:35.540 --> 03:39.920
So now I'm going to give in the next one which is two.

03:40.070 --> 03:44.000
So and let the name be Oscar.

03:45.260 --> 03:46.460
Go ahead and close this.

03:46.490 --> 03:49.520
And then that is the first name with a comma.

03:49.520 --> 03:53.150
And the next one is the last name which is zero.

03:53.240 --> 03:56.420
And then a GPA of 4.7.

03:56.450 --> 04:03.470
And the A is going to be 2092.

04:03.500 --> 04:04.700
And then.

04:07.920 --> 04:08.460
Let's see.

04:08.490 --> 04:09.330
44.

04:09.450 --> 04:09.780
All right.

04:09.780 --> 04:11.700
So we're just adding everything here.

04:11.700 --> 04:14.640
And then the next ID is three.

04:14.670 --> 04:16.680
The next ID is four.

04:16.710 --> 04:18.930
The next ID is five.

04:18.960 --> 04:23.640
The next ID is six and seven.

04:24.150 --> 04:25.680
So I'm sure knows how to draw these.

04:25.680 --> 04:27.120
So it should be faster for us.

04:27.150 --> 04:30.570
And then we can put their first names.

04:30.600 --> 04:32.370
Let me say Barack.

04:33.720 --> 04:38.580
Then the next one, their first name is a Sarah.

04:39.930 --> 04:45.570
So the next one, first name is a mike.

04:46.080 --> 04:51.240
So the next one, first name is a queen.

04:51.720 --> 04:57.300
Then we have the next first name to be Zendaya.

04:57.480 --> 05:00.360
All right, now, where's the last names?

05:01.140 --> 05:04.680
So the last name of Barack is are Harry.

05:07.440 --> 05:09.640
Then for Sarah.

05:10.000 --> 05:13.540
The last name of Sarah is Rocky.

05:14.410 --> 05:19.330
Then for Mike, the last name of Mike is a something.

05:20.650 --> 05:21.520
Then.

05:26.050 --> 05:29.140
For Queen, the last name is Smith.

05:30.610 --> 05:36.970
And then for Zander, the last name is Grace.

05:37.570 --> 05:40.210
And now let's go ahead and add a GPS system said.

05:40.240 --> 05:44.140
Next GPS is going to be 3.7.

05:44.200 --> 05:45.490
And uh.

05:47.860 --> 05:51.730
The next GPS is a 4.8.

05:53.050 --> 05:56.920
Then the next GPS is 2.9.

05:58.810 --> 06:03.070
Then the next GPS is 3.8.

06:03.580 --> 06:07.900
And then the last GPS for grace is 1.0.

06:08.170 --> 06:08.980
All right.

06:09.010 --> 06:19.290
Now let's go ahead and add the years of being roommates, then the next one is 2092, then zero seven.

06:19.320 --> 06:21.210
Okay, we'll have 2092 already.

06:21.240 --> 06:22.560
Let's make this set.

06:22.950 --> 06:24.300
They can be descending.

06:24.330 --> 06:25.230
No problem.

06:27.390 --> 06:27.720
All right.

06:27.750 --> 06:41.250
So and I'm going to give this exactly the same date so we can have this say 2091 1118.

06:41.850 --> 06:42.210
All right.

06:42.210 --> 06:47.310
So let's go ahead and give the next one to be 20.

06:49.830 --> 06:51.570
2097.

06:53.910 --> 06:57.570
And let's just imagine that to be 1118.

06:58.410 --> 07:07.440
And there are the next one we have is a 2099 on 12.

07:08.130 --> 07:12.840
And first then the last one we have here is a.

07:13.210 --> 07:13.810
pointy.

07:13.840 --> 07:15.010
It's it's

07:16.570 --> 07:19.570
0603.

07:19.570 --> 07:22.060
So have never to add our days.

07:22.060 --> 07:25.120
And I believe we don't have any problem anywhere.

07:25.150 --> 07:26.470
The score hadn't been executed.

07:26.470 --> 07:26.800
This.

07:26.800 --> 07:28.030
And check it out.

07:29.170 --> 07:39.880
So it says under here that, uh, a row a row at a row for MySQL cannot know what is the problem.

07:40.750 --> 07:41.050
All right.

07:41.050 --> 07:43.150
So what actually happened is that this is day.

07:43.150 --> 07:49.420
So this can be 118 because we don't have date more than 80 or thirty-firsts.

07:49.450 --> 07:49.930
All right.

07:49.930 --> 07:51.700
So that is what it says.

07:51.700 --> 07:54.370
Incorrect dates 118.

07:54.400 --> 07:54.970
All right.

07:55.000 --> 07:56.710
Now let's go ahead and check it out.

07:56.740 --> 07:59.080
And we are now able to create this.

07:59.080 --> 08:01.360
And uh let's check this out.

08:01.390 --> 08:05.950
Let's drag this up a little and we have all these.

08:05.980 --> 08:12.280
Well you can see that every two big difference ID the first name, the last name, the GP, the enroll

08:12.310 --> 08:12.820
date.

08:12.820 --> 08:16.850
And you can see the first one we is better and it's showing right in there.

08:16.850 --> 08:18.170
And have Oscar.

08:18.170 --> 08:24.290
We have Q we have Barack, we have Sarah, we have Mike, we have Queen and Zendaya.

08:24.650 --> 08:26.360
Okay, that is cool.

08:26.450 --> 08:30.890
Now, that is an interesting stuff to do and I hope you enjoy that.

08:30.920 --> 08:31.910
And let's go ahead and see.

08:31.910 --> 08:33.410
I want to collect these.

08:33.440 --> 08:35.570
I'm going to remove whatever I have right in here.

08:35.810 --> 08:39.410
And now I have only the select that is remaining right in there.

08:39.410 --> 08:42.590
And I want to insert in another data.

08:42.590 --> 08:47.240
And it's going to be incomplete at this time I'm going to say insert.

08:49.010 --> 08:58.280
So insert into students and the value you want to insert this guy.

08:58.280 --> 08:58.850
And I say.

09:02.990 --> 09:10.250
So values and uh let's go ahead and just add only the ID.

09:11.390 --> 09:15.860
And then we'll go ahead and give the first name to be.

09:17.490 --> 09:25.650
doxing and lets the last name be Zimba.

09:26.730 --> 09:27.930
All right, now we have this.

09:27.930 --> 09:28.590
And what?

09:28.620 --> 09:34.050
Insert this into this place and we don't get in the jeep and the inroad date.

09:34.080 --> 09:36.510
Now go ahead and do this and check it out.

09:36.510 --> 09:45.960
So down here you can see error column count doesn't match value count at one because we are unable to

09:45.990 --> 09:51.540
add the Jeep and the the erode dates.

09:51.540 --> 09:56.130
So how can we be able to do this if we want if we want to actually add this.

09:56.130 --> 10:02.490
So go over here and say insert into students and you have to give state where you want to insert that.

10:02.490 --> 10:06.120
So go ahead and say insert into students.

10:06.120 --> 10:14.040
Scientists start their student ID and uh that is students underscore ID.

10:14.310 --> 10:22.810
Then the next one I'm going to insert first underscore name and then the next one is a last underscore

10:22.840 --> 10:23.800
name.

10:23.950 --> 10:24.550
All right.

10:24.580 --> 10:24.940
All right.

10:24.940 --> 10:25.240
Cool.

10:25.240 --> 10:26.590
So let's go ahead and change this name.

10:26.620 --> 10:28.120
Let me call this to be judge.

10:28.120 --> 10:30.640
And let me call this to be Steve.

10:30.730 --> 10:31.120
All right.

10:31.150 --> 10:31.810
So that's cool.

10:31.840 --> 10:35.140
Now go ahead and execute this and let's see what happens.

10:35.170 --> 10:38.020
So now here you can see that is cool.

10:38.050 --> 10:41.650
I'm now I can drag this up so you can see what happens right here.

10:41.860 --> 10:47.590
So Judge Steve and the GP is now an enrollment date is no.

10:47.590 --> 10:54.220
So we can now build and set the values with an incomplete, uh, columns.

10:54.220 --> 10:55.300
So how about is cool.

10:55.300 --> 10:56.860
So I pull it down.

10:56.890 --> 10:59.140
Now run with it and I check it out.

10:59.140 --> 11:03.640
So if you have any questions on this please go ahead and use the question and answer section.

11:03.640 --> 11:05.890
And I'm going to get back to you as soon as possible.

11:05.920 --> 11:06.970
Thank you so much.

11:06.970 --> 11:10.000
And I'm going to see you in the next video lecture.
