The most useful feature of SQL queries, because it allows you to selectively retrieve only rows of interest. The WHERE clause is used to specify the table, and only certain rows are displayed on the basis of where the criteria are described.
SELECT column_name
From derived_table
WHERE conditions
Instance One
SELECT Employeeidno
From employeestatisticstable
WHERE POSITION = ' Manager '
This will show all the administrator ID numbers. In general, text columns adhere to equals or not equal, and ensure that any text that appears in the declaration is surrounded by single quotes (').
SELECT Employeeidno, SALARY
From employeestatisticstable
WHERE POSITION = ' Manager ' and SALARY > 1000
You can combine any logical operator in the WHERE clause. In this case, the salary of all the managers returned by the query is a larger list of 1000 dollars.
Example Three
SELECT employeeaddresstable.address, Employeeaddresstable.lastname
From employeestatisticstable,employeeaddresstable
WHERE Employeeaddresstable.employeeidno = Employeestatisticstable.employeeidno
and employeestatisticstable.position = ' Staff '