SQL WHERE clause is an optional clause used to define what records are to be included in the query. We use conditional operators like <, >, =, >=, <=, !=(<>) , BETWEEN a AND b, IN(list) etc.
FROM WHERE ;
For example we have a table, Employee:
Now, if we want to select the first name and employee_id of only the ones who are males:
SELECT Employee_id, First_name
WHERE sex = ‘male’;
This will give the following result:
For strings , we always enclose them in single quotes.