WEBVTT

00:07.730 --> 00:13.040
In this video lecture, we go ahead and learn how to add a column to our existing table.

00:13.250 --> 00:15.050
So we have this table right here.

00:15.050 --> 00:17.630
And we want to add a column.

00:17.630 --> 00:20.510
And the column is going to be the age of the students.

00:20.510 --> 00:23.120
And how come we would add that age.

00:23.120 --> 00:27.170
So I want to add a column called age and that this table has existed.

00:27.170 --> 00:34.550
And the how can we be able to do that so that this column age can be added to the existing table.

00:34.550 --> 00:40.970
So I can actually go over here and start from the pgadmin to do that, or I move over to the show,

00:40.970 --> 00:43.730
and all I have to do is to alter the table.

00:43.730 --> 00:50.270
So go ahead and alter table and the name of the table is a students.

00:50.270 --> 00:53.870
And then I use a command called add.

00:53.870 --> 00:55.610
And I would add our.

00:55.610 --> 01:02.420
Then select what I want to add and add what is called H.

01:02.450 --> 01:08.690
That is the name of the column I want, and they have to specify the data type that is int and not a

01:09.080 --> 01:09.890
decimal.

01:09.890 --> 01:15.080
So easier integer data type right now plus a macron at the end.

01:15.080 --> 01:19.100
And if I hit enter it can see all the table.

01:19.130 --> 01:27.800
And let me go right here I say backslash d and the go ahead and hit this.

01:27.800 --> 01:35.450
And I'm going to select the table slash D students and hit enter.

01:35.480 --> 01:38.480
And I have H right in here.

01:38.480 --> 01:42.920
And you can see the h integer is here already okay.

01:42.950 --> 01:45.230
So I'm trying to refresh this from here.

01:45.230 --> 01:49.760
And uh let's go ahead and start off from strings.

01:49.760 --> 01:54.800
And if we should execute this command I should be able to see H right here.

01:54.800 --> 01:57.200
So I'm trying to get that.

01:57.210 --> 01:59.820
and that is here so you can see it.

01:59.850 --> 02:06.060
It takes a longer time, maybe because I'm recording and that is why it was not able to come out immediately.

02:06.060 --> 02:11.760
But you can see that uh h is already added after the email.

02:12.420 --> 02:13.890
So I hope that is cool.

02:13.890 --> 02:18.540
So this is how I can be able to add a column to an existing table.

02:18.540 --> 02:21.630
And uh, you can also update that.

02:21.630 --> 02:26.340
So we're also going to look on how to update these and how to work with our days.

02:26.340 --> 02:29.460
So let's go ahead and uh practice what we just learned.

02:29.490 --> 02:32.880
Add any of the column or any column you want to your existing database.

02:32.880 --> 02:36.120
And uh using this procedure is going to work out fine.

02:36.150 --> 02:36.630
Okay.

02:36.660 --> 02:38.160
So that is it for now.

02:38.190 --> 02:40.050
Try that out, learn with it.

02:40.050 --> 02:41.730
And if you have a location, go ahead.

02:41.730 --> 02:45.660
I used the question and answer section and I'm going to get back to you as soon as possible.

02:45.690 --> 02:46.590
Thank you so much.

02:46.590 --> 02:49.620
And I'm going to see you in the next video lecture.
