Hello and welcome.
Thank you for signing lobb to this course this really means a lot to me in this video.
I will explain what the where clause does and the importance of the WHERE clause.
The main purpose of the work laws is to restrict or limit off field.
To date that is returned from the database.
So you know extract data from a table rather than bring back all the data from that table.
You can use the WHERE clause to act as a field to specify the conditions that the work laws we use to
return only data that you require.
I have got tored for Oracle editor.
Whole point I am going to be using be work laws in combination with this select statement to return
a salary range from the Employees Table.
I only want insert in salary range return either want the whole salary.
So this is the query I would write to achieve that.
So you begin with a select and
type in select followed by the name of the column to the column I'm interested in.
If salary you can specify several columns you don't know.
You're not restricted to just one column you specify whatever columns you need or you can even specify
all the column using the asterisk symbol.
So I am going to use a salary column source and select salary and then you need to specify the table
salary come in front of the Sulla column resides in the Employees Table.
So this is why I've said select salary from employees so I'm going to use a WHERE clause to act as a
filter because without the WHERE clause it will return all the salaries from the employee's table.
That is not what I want.
I only want a certain range so I have to tell the WHERE clause what range to return.
So this is what I'll do.
You type in where
salary
is great.
This is the symbol for the greater than sign is created then
this is the amount I've chosen.
Dunno why I chose this amount.
I just like this a month or so select salary from employees where the salary range is greater than 1
6 5 0 0.
Okay sixteen thousand five hundred.
So what is without the WHERE clause.
The query will return all salaries so is where closed now is acting as a filter.
He is in this condition so the where clause needs a condition to act with so the condition I was specified
is any salary greater than sixteen thousand five hundred.
So the fair run this it will only return the salary range that matches that so let me execute this.
So is returned a total of three roles.
Saw the cell where clause as active as a filter using this criteria and returns only three rules which
is which is a criteria set on one salary ranges that matches this so these employees table as only got
three rows of three records where people earning over sixteen thousand five hundred dollars.
All right so this is how you would use the where clause.
The main Pop or the main function of the where clause is to act as a filter because without the where
clause audit details have returned the where clause.
Also in hand where you tried to delete on a date is record from a table.
You need to specify she does specify the where clause and you tried to delete certain records.
It will delete everything you need to specify the where clause where the law is very important.
I cannot stress that enough without the work laws.
It will just go Bizzack and delete or if you specify to delete something without the work lot other
filter is gone.
So the work clause acts as a filter.
In this video I explain why the where clause does the importance of the where clocks are so show an
example of how to use beware clocks.
Thank you so much for watching.
I hope the video has been helpful.
I have enjoyed doing the video and hope it was good for you.
Thank you so much.
Take care.
You have a good day.
Bye for now.