WEBVTT

00:07.550 --> 00:10.250
How can you make a game to another with an actual skill?

00:10.250 --> 00:13.310
And let's go ahead and look at it in class.

00:13.670 --> 00:20.810
So the in class or the in keyword helps us to limit the amount of code we write in our query.

00:20.900 --> 00:26.780
If I actually to go ahead and give me some of the students from about five different countries, I know

00:26.780 --> 00:29.720
you might go ahead and write something very beautiful.

00:29.750 --> 00:31.580
Let's go ahead and see what I'm going to write.

00:31.610 --> 00:41.030
If I say give me select all students from or select all from students and where the country is equal

00:41.120 --> 00:45.080
to, let me say Nigeria.

00:45.290 --> 00:52.640
And then we want to check all the countries so we can go ahead and use something like or then country.

00:54.740 --> 00:58.610
Is equal to let's say China.

01:01.490 --> 01:09.520
All Country is equal to Mexico.

01:13.630 --> 01:16.570
Or we can continue this all.

01:19.240 --> 01:24.010
Country is required to move to the next line instead of moving over there.

01:24.310 --> 01:24.820
All.

01:26.920 --> 01:32.140
Country is equal to Brazil.

01:35.140 --> 01:39.310
Oh, so how about how many countries now have one, two, three, four.

01:39.340 --> 01:40.090
Okay, let's see.

01:40.090 --> 01:47.440
The last one or country is equal to Yemen.

01:48.040 --> 01:48.340
All right.

01:48.370 --> 01:49.840
So this is what I'm going to give me.

01:49.840 --> 01:51.940
And that is absolutely beautiful.

01:51.940 --> 01:55.240
If we go ahead and use the query we have all these.

01:55.240 --> 01:58.870
So I have 242 out of 242.

01:58.870 --> 02:05.080
And if you go over here you can see we have all these countries listed out though we didn't arrange

02:05.080 --> 02:06.520
them what we're going to do that.

02:06.520 --> 02:06.940
What?

02:06.940 --> 02:12.070
The main thing here is that you have a very long query.

02:12.670 --> 02:15.880
Select all from strings where country is equal to Nigeria.

02:15.910 --> 02:17.320
Country is equal to China.

02:17.350 --> 02:18.850
Country is equal to Mexico.

02:18.850 --> 02:21.790
Country is equal to Brazil, and the country is equal to Yemen.

02:21.790 --> 02:27.670
So you are almost called country one, two, three, four and five.

02:28.720 --> 02:34.990
So you can see that it doesn't make sense to us if you are using this as a professional.

02:34.990 --> 02:39.970
So how can you limit the use of this countries.

02:40.000 --> 02:43.870
Now that is really where clause comes in.

02:44.050 --> 02:52.720
Now what if we go ahead and see select all from strings where country in.

02:52.750 --> 02:57.610
Then we introduce the in keyword where country in.

02:57.610 --> 03:03.700
And then we go ahead and say uh Nigeria then.

03:03.700 --> 03:04.420
Comma.

03:07.420 --> 03:09.760
Brazil, comma.

03:09.760 --> 03:09.810
Coma.

03:13.920 --> 03:14.970
China.

03:15.900 --> 03:16.410
AMA.

03:19.080 --> 03:20.100
Mexico.

03:20.760 --> 03:24.300
Coma and Yemen.

03:24.330 --> 03:26.910
Then we go ahead and, uh.

03:27.780 --> 03:29.610
Who's this at the end?

03:29.850 --> 03:31.410
The next question is a curious query.

03:31.440 --> 03:32.400
I check it out.

03:32.430 --> 03:34.530
We still have row two.

03:34.530 --> 03:41.670
Row 42 out of 42 showing that this query we write here looks professional and very simple.

03:41.670 --> 03:47.160
So in that way, you can enlist numerous countries instead of going around to see where country is equal

03:47.160 --> 03:50.670
to these that, these, that which doesn't actually make sense.

03:50.670 --> 03:54.300
And if we went ahead and see what what it is.

03:54.330 --> 03:59.310
I will simply go ahead and go over here and see order.

04:00.990 --> 04:02.970
I can go ahead and move to the next line.

04:03.000 --> 04:03.480
Okay.

04:03.480 --> 04:12.870
So order by then country and then put a semicolon at the at end.

04:12.870 --> 04:15.660
And if we go ahead and run this pattern, is this correct?

04:15.690 --> 04:16.260
Check it out.

04:16.290 --> 04:23.910
And we have that arranged for us Brazil, then China, then China.

04:24.210 --> 04:25.290
Very, very much.

04:25.290 --> 04:25.560
Right.

04:25.560 --> 04:30.030
India, Mexico and Nigeria and Yemen.

04:30.690 --> 04:38.100
So in other words, the in keyword helps us to make our code look beautiful and simplified.

04:38.130 --> 04:43.410
Instead of repeating most of the things that doesn't need to be repeated.

04:44.370 --> 04:48.270
So go ahead and implement this practice with it.

04:48.300 --> 04:56.160
You can also introduce that to first name, last name, email or gender, or even student ID or erode

04:56.190 --> 04:56.820
date.

04:56.820 --> 04:58.230
So practice with it.

04:58.830 --> 05:00.030
Have a beautiful day.

05:00.030 --> 05:04.800
If have any question, use the question and answer section and I'm going to get back to you as soon

05:04.800 --> 05:05.580
as possible.

05:05.610 --> 05:09.720
Thank you so much and I'm going to see you in the next video lecture.
