How can you make a game to another with an actual skill?
And let's go ahead and look at it in class.
So the in class or the in keyword helps us to limit the amount of code we write in our query.
If I actually to go ahead and give me some of the students from about five different countries, I know
you might go ahead and write something very beautiful.
Let's go ahead and see what I'm going to write.
If I say give me select all students from or select all from students and where the country is equal
to, let me say Nigeria.
And then we want to check all the countries so we can go ahead and use something like or then country.
Is equal to let's say China.
All Country is equal to Mexico.
Or we can continue this all.
Country is required to move to the next line instead of moving over there.
All.
Country is equal to Brazil.
Oh, so how about how many countries now have one, two, three, four.
Okay, let's see.
The last one or country is equal to Yemen.
All right.
So this is what I'm going to give me.
And that is absolutely beautiful.
If we go ahead and use the query we have all these.
So I have 242 out of 242.
And if you go over here you can see we have all these countries listed out though we didn't arrange
them what we're going to do that.
What?
The main thing here is that you have a very long query.
Select all from strings where country is equal to Nigeria.
Country is equal to China.
Country is equal to Mexico.
Country is equal to Brazil, and the country is equal to Yemen.
So you are almost called country one, two, three, four and five.
So you can see that it doesn't make sense to us if you are using this as a professional.
So how can you limit the use of this countries.
Now that is really where clause comes in.
Now what if we go ahead and see select all from strings where country in.
Then we introduce the in keyword where country in.
And then we go ahead and say uh Nigeria then.
Comma.
Brazil, comma.
Coma.
China.
AMA.
Mexico.
Coma and Yemen.
Then we go ahead and, uh.
Who's this at the end?
The next question is a curious query.
I check it out.
We still have row two.
Row 42 out of 42 showing that this query we write here looks professional and very simple.
So in that way, you can enlist numerous countries instead of going around to see where country is equal
to these that, these, that which doesn't actually make sense.
And if we went ahead and see what what it is.
I will simply go ahead and go over here and see order.
I can go ahead and move to the next line.
Okay.
So order by then country and then put a semicolon at the at end.
And if we go ahead and run this pattern, is this correct?
Check it out.
And we have that arranged for us Brazil, then China, then China.
Very, very much.
Right.
India, Mexico and Nigeria and Yemen.
So in other words, the in keyword helps us to make our code look beautiful and simplified.
Instead of repeating most of the things that doesn't need to be repeated.
So go ahead and implement this practice with it.
You can also introduce that to first name, last name, email or gender, or even student ID or erode
date.
So practice with it.
Have a beautiful day.
If have any question, use the question and answer section and I'm going to get back to you as soon
as possible.
Thank you so much and I'm going to see you in the next video lecture.