Skip to main content

Restricting data using where clause

Display employees name whose salary greater then 12000

SELECT last_name, salary
FROM employees
WHERE salary>12000;SQL

Display employee whose employee id is 176

SELECT last_name, Employee_id
FROM employees
WHERE employee_id=176;SQL

Display employees name whose salary between 5000 and 10000

SELECT last_name, salary
FROM employees
WHERE salary BETWEEN 5000 AND 10000;
sc1

Display employee whose last name is Matos or Taylor

SELECT last_name,
employee_id,
hire_date
FROM employees
WHERE last_name IN(‘Matos’,’Taylor’);

sc2