WEBVTT

00:00.350 --> 00:05.630
OK let's take a look at a potential solution for this people problem.

00:06.150 --> 00:13.110
So first thing we need to create the table using the create table statement with first name as a VAR

00:13.140 --> 00:18.500
char 20 last name var char with the 20 character limit and age as an int.

00:18.570 --> 00:21.120
So let's do that.

00:21.120 --> 00:25.150
I'm just working in the cat app for now.

00:25.320 --> 00:26.140
It's fine.

00:26.220 --> 00:27.810
We're going to do this at the end.

00:28.260 --> 00:32.530
So we'll start off with the create table and we'll call it people

00:35.800 --> 00:45.920
and the first thing that we'll have is first name which is FAR FAR FAR char 20.

00:46.220 --> 00:51.540
Next thing is last name which is the exact same.

00:51.770 --> 00:57.130
And then finally we have age which is an ant and then our closing parentheses.

00:58.660 --> 01:01.010
OK let's just double check it worked.

01:01.050 --> 01:08.190
Use describe people call first name us name age Farje of our char.

01:08.220 --> 01:09.860
It's perfect.

01:10.050 --> 01:16.080
So now we're going to insert our first person Tina Belcher who is 13.

01:16.950 --> 01:22.820
So insert into people and we'll start off.

01:22.860 --> 01:34.220
Let's do first name last name age and then values and we'll do.

01:34.440 --> 01:42.370
Tina Belcher was 13 right.

01:43.610 --> 01:47.110
OK we hit enter.

01:47.670 --> 01:49.270
Just double checked that it worked.

01:49.290 --> 01:54.390
Select star from people there.

01:54.420 --> 01:57.900
Tina is perfect.

01:57.900 --> 02:03.990
Now we're going to insert our second person Bob Belcher who is 42 and my instruction here was do it

02:04.020 --> 02:05.530
in a different order.

02:05.760 --> 02:14.250
So we'll do an insert into people this time let's do it Age last name first name

02:16.920 --> 02:18.020
values.

02:18.360 --> 02:23.090
So age was hired God he's 42.

02:23.610 --> 02:29.340
Last name is Belcher and first name is Bob.

02:29.770 --> 02:31.640
Don't forget our semi-colon.

02:32.490 --> 02:34.830
Let's do our select again.

02:35.010 --> 02:36.010
Perfect.

02:36.030 --> 02:36.670
It worked out.

02:36.680 --> 02:38.750
It was supposed to be great.

02:39.630 --> 02:43.150
So then the last insert we're going to do is a multiple insert.

02:43.530 --> 02:47.430
We have Linda Belcher Philip Fronde and Calvin Fisher.

02:47.730 --> 02:49.890
Oh boy this is going to be a lot to remember.

02:50.130 --> 02:52.860
Let's start off by just typing out the basics.

02:52.860 --> 03:02.820
Insert into people and we'll do this one with first name then my last name and then finally age just

03:02.820 --> 03:04.110
like that.

03:04.560 --> 03:09.710
Then we'll do values and we'll start off half.

03:09.840 --> 03:19.440
We'll start off with Linda Belcher who is forty five I think it was.

03:19.440 --> 03:26.960
And I'll do Comus on the new line and then we'll go with Phillip Fronde

03:33.110 --> 03:35.880
and he is 45.

03:35.990 --> 03:36.400
No.

03:36.500 --> 03:38.630
Thirty eight.

03:38.660 --> 03:39.800
I mean is this too hard.

03:40.920 --> 03:43.680
Lastly we have Calvin fish Jodra.

03:43.680 --> 03:50.530
I'm just going to copy fish owner who is 70 Calvin

03:53.130 --> 03:55.660
fish over 70.

03:56.060 --> 03:57.020
All righty.

03:57.250 --> 03:59.770
And before I forget I need a semi-colon.

04:00.980 --> 04:01.860
Perfect.

04:02.060 --> 04:04.230
Let's do our select star again.

04:04.390 --> 04:11.340
Have to use up arrow a couple of times and we have Linda Phillippe and Calvin Belcher Fronde fish over

04:11.330 --> 04:13.410
40 5:38 70.

04:13.640 --> 04:14.730
Perfect.

04:14.810 --> 04:15.740
So that's it.

04:15.950 --> 04:20.870
And I didn't specify this in the instructions but let's go ahead and delete the table.

04:20.990 --> 04:25.430
So that's a drop table people.

04:25.430 --> 04:31.740
Goodbye to the Belchers and the other two and we verify that it's gone.

04:31.740 --> 04:38.700
If you tried to do select start from people we get an error but if we do show tables.

04:38.700 --> 04:40.310
Now we only have cats.

04:40.500 --> 04:41.630
All people are gone.

04:41.790 --> 04:42.980
Just left with cat.
