WEBVTT

00:07.820 --> 00:11.780
In this video we go ahead and look at Wild Card.

00:12.440 --> 00:12.770
All right.

00:12.800 --> 00:16.430
So when you talk about wild card you use the keyword card.

00:16.430 --> 00:21.950
Like and uh how is this important in PostgreSQL.

00:22.280 --> 00:26.960
It's very, very important because you use that to actually call your table.

00:27.170 --> 00:27.560
All right.

00:27.560 --> 00:29.930
Let's go ahead and look at something here.

00:31.490 --> 00:37.790
Over here you can see we have so many email addresses now maybe in the company you actually filter the

00:37.790 --> 00:43.670
email and just get in students or in the schoolyard to get students that have only Gmail.

00:44.090 --> 00:55.490
What I have done and what we have that come because already you can see we have a.gov.edu and so on

00:55.490 --> 00:56.660
and that work.

00:56.750 --> 01:00.950
And how can we use a filter that remember you are going to filter this.

01:00.950 --> 01:05.190
So I think at this moment you might see the importance of the wild white card.

01:05.700 --> 01:08.280
Now, let me go ahead and give you an example of how this works.

01:08.280 --> 01:09.510
So let me go ahead and see.

01:09.540 --> 01:11.190
Select all from students.

01:11.220 --> 01:21.180
And uh I'm going to see where is it where class I'm going to say where email.

01:21.210 --> 01:24.300
Then I'm going to use a keyword called like.

01:24.330 --> 01:29.400
And with this keyword I'll go over here and use what is called a percentage.

01:29.400 --> 01:40.440
So using the percentage then I can go ahead and uh, see that if I want to get maybe, maybe I want

01:40.470 --> 01:46.710
to use filtered email with that org or that org and put a semicolon at the end.

01:46.740 --> 01:48.930
Let's go ahead and run this query and check it out.

01:49.200 --> 01:49.500
All right.

01:49.500 --> 01:54.210
It says that uh, the Where clause okay I have a semicolon right in here.

01:54.240 --> 02:00.300
I have to remove that set off from students where Guyana is the query and check it out.

02:00.330 --> 02:02.280
Now look at the email.

02:02.310 --> 02:09.450
The other email I have here are emails which.org can you see that Or emails.

02:09.450 --> 02:11.970
Here are emails with that arc.

02:12.000 --> 02:16.470
And what if I want to check people that have Gmail?

02:16.500 --> 02:21.000
All I need to do is this percentage was always come first.

02:21.030 --> 02:26.280
Again, I see gmail.com and let's go ahead and check it out.

02:26.280 --> 02:31.140
And no student has, uh, email with Gmail account.

02:31.140 --> 02:36.360
So what if it is named as a Google that's com.

02:36.390 --> 02:38.250
Let's run this and check it out.

02:38.250 --> 02:43.650
So we have these two students that has google.com and so on.

02:43.710 --> 02:49.500
And uh, we go ahead and check people that have only.org.

02:49.530 --> 02:51.990
I can go ahead and hit on this.

02:51.990 --> 02:55.320
And uh, we have only that arc.

02:56.130 --> 03:09.540
Now if I go ahead and uh, say maybe I actually want to see people that have, uh, email that is named

03:09.540 --> 03:15.340
twitter.com or I need to go ahead and do is quietly say twitter.com.

03:15.340 --> 03:21.160
And if I should do that, it should filter every of these and give you people the answers, or have

03:21.190 --> 03:23.620
email that ends with twitter.com.

03:23.650 --> 03:25.840
Go ahead and uh, execute this.

03:25.840 --> 03:28.240
And we have just four of them.

03:29.020 --> 03:34.480
You can see this twitter.com, twitter.com twitter.com and twitter.com.

03:34.810 --> 03:39.070
So this is a way you can actually use this white card, right.

03:39.100 --> 03:39.640
All right.

03:40.060 --> 03:40.870
Very good.

03:40.900 --> 03:53.410
Now what if I want to go ahead and, uh, actually see I want people maybe this is not just email.

03:53.440 --> 03:59.140
Let's go ahead and see under the first name first underscore name.

03:59.140 --> 04:09.790
And I want all the people that has P as the that ends their last name to not have P that end as their

04:09.820 --> 04:10.750
first name.

04:10.780 --> 04:12.580
The handle is actually scary.

04:12.730 --> 04:14.080
We have no one.

04:14.080 --> 04:18.470
But what if I take this P to the front before the percentage.

04:18.500 --> 04:19.610
Let's go ahead and check it out.

04:19.640 --> 04:25.730
So if I put this p to the front, it means that I want people whom their first names start with p.

04:25.760 --> 04:28.190
Let's go ahead and execute this query and check it out.

04:28.190 --> 04:30.170
And check out the first name.

04:30.170 --> 04:35.120
And you can see that all of the people that are first names started with P are here.

04:35.240 --> 04:44.330
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.

04:44.360 --> 04:46.640
And let's go ahead and execute that and check it out.

04:46.670 --> 04:48.050
Check out the first name here.

04:48.380 --> 04:56.360
That to get to the hassle a hassle and check their last name at the end of their first name are E.

04:56.720 --> 04:58.310
The same thing is with last name.

04:58.310 --> 05:05.210
If I go ahead and say last underscore name and if I execute this query, check out the last name and

05:05.210 --> 05:08.600
you can see that the the name ends with a.

05:08.720 --> 05:16.400
And the same thing is applicable if I go and the studies the last name with a before the percentage.

05:16.400 --> 05:22.920
And if I execute this query and none of them has their first name and last name started with a e.

05:22.950 --> 05:24.720
And what people that started with C.

05:24.750 --> 05:26.130
Just go ahead and check it out.

05:26.580 --> 05:27.720
And, uh.

05:27.750 --> 05:28.710
Last name?

05:28.740 --> 05:29.010
No.

05:29.010 --> 05:30.060
Won't start with C.

05:30.210 --> 05:32.730
And what if uppercase C.

05:33.120 --> 05:36.780
Go ahead and check it out and have people tell you which uppercase C.

05:36.870 --> 05:37.890
Check it out.

05:38.160 --> 05:44.340
So that is case sensitive quiet and C uppercase A because I didn't mention that.

05:44.370 --> 05:49.320
You can see we have people that started with uppercase E for the last name.

05:49.320 --> 05:57.480
So this is applicable to both first name last name email gender error date and country.

05:57.990 --> 06:01.950
Now there is another one called uh the underscore.

06:01.980 --> 06:12.660
If I go ahead and remove these and I come over here and say, maybe I want people who have who earned

06:12.660 --> 06:16.830
some moxie and we have one, two, three, four, five.

06:16.920 --> 06:22.380
I'm gonna say the very first one is a character that represents the first character.

06:22.560 --> 06:28.230
The second underscore represents the second character underscore represent the top character.

06:28.320 --> 06:35.940
And if I end these people, that character starts, have three characters and end with T were printed

06:35.940 --> 06:37.080
out for last name.

06:37.080 --> 06:38.850
And let's go ahead and check it out.

06:38.940 --> 06:40.020
No one.

06:40.500 --> 06:45.630
And what if we go to the first name and uh, first underscore name.

06:45.630 --> 06:49.020
And let's go ahead and execute this and look at this.

06:49.050 --> 06:50.730
Gusti Motty.

06:50.970 --> 06:54.030
Bertie, Katie and Patty.

06:54.150 --> 06:55.380
I hope that is cool.

06:55.380 --> 07:01.800
So these people, this very first name presents or whoever that has a first name, no matter what it

07:01.800 --> 07:02.160
is.

07:02.160 --> 07:05.550
But the two last name ends with T at the.

07:06.870 --> 07:07.800
I hope that is cool.

07:07.800 --> 07:12.240
So the center is applicable to country, the IMO and so on.

07:13.230 --> 07:14.580
I hope that is very very interesting.

07:14.580 --> 07:16.740
So go ahead and pull it down, practice with it.

07:16.740 --> 07:20.070
And uh that is very very interesting.

07:20.070 --> 07:26.820
So just like we did in the percentage, if I go ahead and uh, check this and I put something like P

07:26.850 --> 07:34.810
or E, it means people whom the first letter starts with P and ends with any tricky words.

07:34.840 --> 07:37.030
Go ahead and execute this and let's check it out.

07:37.060 --> 07:43.270
You can see the whole path page, paper and blue.

07:44.410 --> 07:46.750
And that is how it is.

07:46.750 --> 07:49.390
So it is before or is it after.

07:49.390 --> 07:54.760
And that is applicable to percentage and underscore in this white card.

07:54.760 --> 08:02.020
And that is a very interesting aspect of our query system or query function and PostgreSQL.

08:02.020 --> 08:08.680
So go ahead and turn on this uploaded to last name to email to gender in word date and country.

08:08.680 --> 08:10.570
And you really love what it gets.

08:10.570 --> 08:14.320
And it can be used to make some filters that are very very interesting.

08:14.320 --> 08:15.790
So thank you so much.

08:15.820 --> 08:20.110
If you have any question, shop a question under the question section.

08:20.110 --> 08:22.570
And I'm going to get back to you as soon as possible.

08:22.600 --> 08:25.840
Thank you and see you in the next video lecture.
