WEBVTT

00:07.250 --> 00:12.800
So in this video lecture we go ahead and look at how to update our tables.

00:12.800 --> 00:17.750
So and right here I have this guy called Peter Jude.

00:17.750 --> 00:20.240
And it's Timo is a pretty dude.

00:20.240 --> 00:26.390
And this guy is I know I can be able to add anything or I can be able to rename this Peter.

00:26.420 --> 00:28.880
First of all, let me go ahead and rename Peter.

00:28.880 --> 00:41.600
And uh, and I'm going to say then when I say updates, table updates and then the server name is students

00:41.600 --> 00:47.570
and they I'll go ahead and say set email.

00:48.080 --> 00:59.960
So set email equal to I'm going to say this is a Peter man at uh.

01:02.300 --> 01:02.720
Yahoo.

01:02.720 --> 01:03.920
Now that com.

01:04.460 --> 01:08.750
So I'm going to set us email to be Peter man@yahoo.com.

01:09.120 --> 01:11.340
Um, well.

01:13.470 --> 01:17.940
I can say first name or email or anything because you've learned about it.

01:17.970 --> 01:18.510
We are close.

01:18.510 --> 01:19.110
So we are.

01:19.110 --> 01:24.000
First name is equal to Peter.

01:24.600 --> 01:25.680
I'm professor McDonald.

01:25.680 --> 01:29.010
And and if I go ahead and hit on enter update one.

01:29.250 --> 01:40.500
And then if I should go back and uh select a string and hit enter, you can see that uh, okay.

01:40.530 --> 01:44.100
I actually did not select to view this table.

01:44.130 --> 01:47.340
I was just going to view the columns.

01:47.340 --> 01:59.340
So to view the students their work I'll go ahead and say uh, select uh all from students where Omicron

01:59.340 --> 02:05.820
N and this is Peter Mount at Yahoo Mail.com.

02:06.480 --> 02:07.020
You see that?

02:07.020 --> 02:09.690
And over here, if I had not run this.

02:10.020 --> 02:11.910
And let's go ahead and check it out.

02:11.910 --> 02:14.190
And now this takes the time.

02:14.190 --> 02:18.150
It takes the time to actually update because I'm recording.

02:18.150 --> 02:21.120
and that is why it is affecting my pgadmin.

02:21.120 --> 02:22.980
And it should have.

02:23.010 --> 02:26.250
Always or already updated immediately.

02:26.280 --> 02:32.700
Okay, but you can see from the show that I have put a man at Yahoo!

02:32.730 --> 02:37.470
Mail.com and no longer RT Jude at gmail.com.

02:37.740 --> 02:39.180
All right, I hope that is cool.

02:39.180 --> 02:43.200
So I'll go ahead and say select from strength.

02:43.230 --> 02:46.380
And I'll go ahead and execute this query or any one of them.

02:46.410 --> 02:47.910
Go ahead and execute this query.

02:47.910 --> 02:51.450
And you can see I have a pizza man at Yahoo!

02:51.480 --> 02:52.530
Mail.com.

02:52.530 --> 02:54.690
And hope that is cool.

02:55.320 --> 03:01.380
So I just updated that now and uh, it actually went down instead of being up.

03:01.380 --> 03:02.490
But that isn't the problem.

03:02.490 --> 03:08.010
It was always going to know how to do this in ascending and descending other as time comes on.

03:08.910 --> 03:09.180
All right.

03:09.210 --> 03:14.220
So as time goes on, we are also going to learn about how to arrange this in ascending or descending

03:14.220 --> 03:14.610
order.

03:14.610 --> 03:16.140
And that is not a problem.

03:16.320 --> 03:23.700
Now I can also go ahead and uh, add in each because we don't have each or I'll go ahead and add this

03:23.700 --> 03:24.720
one that I know.

03:24.750 --> 03:29.680
Or let's go ahead and use Used Pgadmin to update this because I've done that using the show.

03:29.680 --> 03:31.060
So let's see.

03:31.450 --> 03:33.340
Uh, update.

03:35.950 --> 03:42.340
Students and I'll go ahead and, uh, say it.

03:44.800 --> 03:48.340
I'm going to set the email or the age to okay.

03:48.340 --> 03:53.080
I'm going to set age equal to 24.

03:54.070 --> 03:54.340
All right.

03:54.340 --> 03:56.860
So set it equal to 24.

03:56.860 --> 04:03.760
And uh, where then I can actually select maybe Sarah where students ID.

04:06.370 --> 04:12.850
Students underscore ID is equal to five or 4 or 2.

04:13.060 --> 04:14.320
Let me say four.

04:14.350 --> 04:16.570
And then press semicolon at the end.

04:16.570 --> 04:18.190
And let's go ahead and run.

04:18.190 --> 04:22.150
This going to go over to this place and select that and check it out.

04:22.150 --> 04:31.900
So backslash d and um or go ahead and select uh all from.

04:34.810 --> 04:38.650
Students The Empress Omicron at the end of days and hit enter.

04:38.650 --> 04:43.690
And you can see that Sarah age is now 24 because I just updated that.

04:43.690 --> 04:48.970
So go ahead and update every other one of them one by one so that it can be able to master it.

04:48.970 --> 04:53.410
So Sarah is now updated and Peter email was updated.

04:53.410 --> 04:55.090
I can rename their names.

04:55.090 --> 05:01.420
I can change their names from Henry to any name, Rocky to any name, Judith to any name, Rocky to

05:01.450 --> 05:05.320
any name, and Barack and so on and so forth.

05:05.350 --> 05:05.980
All right.

05:05.980 --> 05:12.040
So this is a way we can be able to update a table in PostgreSQL.

05:12.070 --> 05:12.310
All right.

05:12.310 --> 05:13.930
Let me go ahead and check this one more time.

05:13.930 --> 05:17.680
So I'll just go ahead and use the SQL shell because it's very easy.

05:17.680 --> 05:20.560
And this is what most developers actually use.

05:20.560 --> 05:22.390
So that is about updates.

05:22.390 --> 05:26.020
And you go ahead in the next lecture to check out something very interesting again.

05:26.020 --> 05:31.510
So continue with the lecture if you have any question on this just the question and answer section.

05:31.540 --> 05:35.710
Else we move over to the next lecture and get hold of what is happening there.

05:35.710 --> 05:38.110
So see you then and bye.
