In this video we go ahead and look at Wild Card.
All right.
So when you talk about wild card you use the keyword card.
Like and uh how is this important in PostgreSQL.
It's very, very important because you use that to actually call your table.
All right.
Let's go ahead and look at something here.
Over here you can see we have so many email addresses now maybe in the company you actually filter the
email and just get in students or in the schoolyard to get students that have only Gmail.
What I have done and what we have that come because already you can see we have a.gov.edu and so on
and that work.
And how can we use a filter that remember you are going to filter this.
So I think at this moment you might see the importance of the wild white card.
Now, let me go ahead and give you an example of how this works.
So let me go ahead and see.
Select all from students.
And uh I'm going to see where is it where class I'm going to say where email.
Then I'm going to use a keyword called like.
And with this keyword I'll go over here and use what is called a percentage.
So using the percentage then I can go ahead and uh, see that if I want to get maybe, maybe I want
to use filtered email with that org or that org and put a semicolon at the end.
Let's go ahead and run this query and check it out.
All right.
It says that uh, the Where clause okay I have a semicolon right in here.
I have to remove that set off from students where Guyana is the query and check it out.
Now look at the email.
The other email I have here are emails which.org can you see that Or emails.
Here are emails with that arc.
And what if I want to check people that have Gmail?
All I need to do is this percentage was always come first.
Again, I see gmail.com and let's go ahead and check it out.
And no student has, uh, email with Gmail account.
So what if it is named as a Google that's com.
Let's run this and check it out.
So we have these two students that has google.com and so on.
And uh, we go ahead and check people that have only.org.
I can go ahead and hit on this.
And uh, we have only that arc.
Now if I go ahead and uh, say maybe I actually want to see people that have, uh, email that is named
twitter.com or I need to go ahead and do is quietly say twitter.com.
And if I should do that, it should filter every of these and give you people the answers, or have
email that ends with twitter.com.
Go ahead and uh, execute this.
And we have just four of them.
You can see this twitter.com, twitter.com twitter.com and twitter.com.
So this is a way you can actually use this white card, right.
All right.
Very good.
Now what if I want to go ahead and, uh, actually see I want people maybe this is not just email.
Let's go ahead and see under the first name first underscore name.
And I want all the people that has P as the that ends their last name to not have P that end as their
first name.
The handle is actually scary.
We have no one.
But what if I take this P to the front before the percentage.
Let's go ahead and check it out.
So if I put this p to the front, it means that I want people whom their first names start with p.
Let's go ahead and execute this query and check it out.
And check out the first name.
And you can see that all of the people that are first names started with P are here.
So if I take this to the back and let's say A, it means I want all the first names that end with E.
And let's go ahead and execute that and check it out.
Check out the first name here.
That to get to the hassle a hassle and check their last name at the end of their first name are E.
The same thing is with last name.
If I go ahead and say last underscore name and if I execute this query, check out the last name and
you can see that the the name ends with a.
And the same thing is applicable if I go and the studies the last name with a before the percentage.
And if I execute this query and none of them has their first name and last name started with a e.
And what people that started with C.
Just go ahead and check it out.
And, uh.
Last name?
No.
Won't start with C.
And what if uppercase C.
Go ahead and check it out and have people tell you which uppercase C.
Check it out.
So that is case sensitive quiet and C uppercase A because I didn't mention that.
You can see we have people that started with uppercase E for the last name.
So this is applicable to both first name last name email gender error date and country.
Now there is another one called uh the underscore.
If I go ahead and remove these and I come over here and say, maybe I want people who have who earned
some moxie and we have one, two, three, four, five.
I'm gonna say the very first one is a character that represents the first character.
The second underscore represents the second character underscore represent the top character.
And if I end these people, that character starts, have three characters and end with T were printed
out for last name.
And let's go ahead and check it out.
No one.
And what if we go to the first name and uh, first underscore name.
And let's go ahead and execute this and look at this.
Gusti Motty.
Bertie, Katie and Patty.
I hope that is cool.
So these people, this very first name presents or whoever that has a first name, no matter what it
is.
But the two last name ends with T at the.
I hope that is cool.
So the center is applicable to country, the IMO and so on.
I hope that is very very interesting.
So go ahead and pull it down, practice with it.
And uh that is very very interesting.
So just like we did in the percentage, if I go ahead and uh, check this and I put something like P
or E, it means people whom the first letter starts with P and ends with any tricky words.
Go ahead and execute this and let's check it out.
You can see the whole path page, paper and blue.
And that is how it is.
So it is before or is it after.
And that is applicable to percentage and underscore in this white card.
And that is a very interesting aspect of our query system or query function and PostgreSQL.
So go ahead and turn on this uploaded to last name to email to gender in word date and country.
And you really love what it gets.
And it can be used to make some filters that are very very interesting.
So thank you so much.
If you have any question, shop a question under the question section.
And I'm going to get back to you as soon as possible.
Thank you and see you in the next video lecture.