I will call you back again to another video lecture in MySQL.
And in this video lecture we go ahead and learn how to select the tag from our table.
So we have nobody inside the target table.
Now let's learn how to select that.
One of the ways we should learn previously is how to select all of the table which is select and the
accessories is all.
And then you go ahead and say from.
And then the table name is students.
Then put a semicolon at the end and execute the query.
And we have the table running here.
So we have already selected everything inside the table.
Now what if we want to select maybe some of the data, maybe the column, the first name, the last
name, the GPA enrolled date, and so on.
What I need to do is that I'm going to remove the exteriors, and then I'm going to specify the data
I want to select.
Maybe I want to select the enrolled date or guidelines say enroll underscore date.
And then I will go ahead and execute this query.
So we check it out.
So you can see I was able to be able to print out just the error date.
So I can put a comma.
And then I'll go ahead and say maybe I want to add GP.
And if I say that.
So first of all make it to be orderly.
I can say GP and then a warhead and execute that.
And you can see that I have GP and I have a route date.
I can also reorder that.
Maybe I can go in and say a road date and violence GP and then I'll go here and select that and you
can see I have the road dates come first and then the GP.
So it's something like saying I want to select the first name and last name.
Can I go ahead and say las underscore name comma and then the first underscore name.
And then go ahead and execute the query.
And you can see the last name con before the first name order is cool.
So this is a way to be able to select.
You can select the individual uh column and I print it out.
Maybe you just want to select only the first name.
You go ahead and execute curious query and only the first name is printed out.
So this is a way we would select, um, each of the column and print them out, or select a specific
amount of column you want to print out, and that will come out.
Now what if we use what is called the Where clause.
Yes, we have what is called Where clause.
Let me say I want to select every data.
And I'm going to say select every data where then you cannot specify whatever you want.
Maybe where are the students.
Well these are my students.
So that we are students underscore ID is equal to one.
And I need to select all where the stress ID is equal to one.
And if I go here as as a query I have to what is selected because I need where the student ID is equal
to one.
Now if I want to select where not yes, we are not.
If I put in this exclamation mark before the equal sign.
It means I want to select all the data or the IDs which are not equal to one.
And let's go ahead and execute this code and check it out so we can see that our the first ID pizza
is omitted.
That is the first one.
One which is pizza is omitted and is printed out from 2 to 8.
So this is a where clause we can specify.
Maybe we want to select everything where this happens.
Let me go ahead and save this guide or remove this.
And let me say I want to select all where maybe the first underscore name is equal to Barack.
So so I want to put this memory this is going to be inside the quotation mark Barack.
And here I have Barack.
And that is what I want to select.
And if I should go ahead and run this, I have Barack, which is ID three, which is selected for me.
So let me go ahead and say I want to select where the GP is greater than 3.5.
So go ahead and say I want to select everything from students where GP is greater than or equal to 3.5.
And let's go ahead and execute this query.
And now we have ID one, two, three, four and six.
So every row is below 3.5.
So if I go ahead and say maybe 4.0.
So go ahead and change this to 4.0.
So this go ahead and check it out.
And it's the cutest query.
Let's check it out.
So only two out of the data we have in the table meets all the requirements.
So we have 4.7 and 4.8 and the reservoir at below 4.0.
So what do you want to select the error dates.
Remedy will have this error dates 29 to 1 1118.
So let's go ahead to select dates I'm going to say we are a row underscore dates.
So go ahead and shift.
ship.
This is a code tool.
So I want to specify this date that I have here.
So I have so many like about three of them where we created that.
And this is the cutest query.
And check it out.
So we have this tool here which is a 2019 one 1118 okay.
So if I go ahead and select and when I check all the students and know the dates that are many, so
go ahead and execute this.
So we have our 2019 one okay.
We have this tool and that is why we have just that.
So only these two this is a 2097 and not 2091 because I was expecting three to come out.
And it is correct.
Right in here that is 2097 and not 2091 as well.
So how many is cool.
Go ahead and check it out.
So what if I want to say maybe I want to select.
Let me go ahead and put this back again.
We had date is greater than or this guy had a we can actually do date.
this.
We are data is greater than 2091.
Go ahead and execute this query and check it out.
So we selected date which is greater than or equal to.
So if I go ahead and remove the equal sign this is the cutest query.
And you have the ones that are greater than 2091.
So 2091 is not included right in here.
So you can see that.
So that is cool.
And what if you want to select where date is.
No.
Remember that one.
We added some data.
Last we omit some of the columns like uh the enrolled dates.
So you want to do that I'm going to say we add date is no enrolled.
It is no.
Go ahead and execute this query.
And I have George Steve.
So now GP and no enroll date.
Right.
So if we also put everything that is the one that have eroded but are not.
No.
Go ahead and say is not no.
And that is a cute query.
And let's check it out.
And you can no longer see if I drag this up and go ahead and drag this up.
You can see that Judge Steve is not included because Judge Steve is no right.
So that is cool.
Go ahead and drag this down again so that we have a space right in here.
And that is cool.
So this is a way you can be able to select data from your table.
You can play around with every one of these okay.
So go ahead and put back our select okay.
Then go ahead and select everything.
All right.
Now go ahead and select everything.
And down here you can see that Steve is already included okay.
So that is cool.
We have everything printed out printed out for us.
And that is very interesting pronoun with them.
And if you have any questions on please go ahead and 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.