SQL Where
Domains:
SQL
The "WHERE" clause in SQL allows users to filter records based on specific conditions. WHERE can be used by users when selecting, updating, or deleting records.
Selection of all employees in the Sales department.
SELECT * FROM employees
WHERE department = 'Sales';
Increasing the salary of all employees in the Sales department by 10%.
UPDATE employees
SET salary = salary * 1.10
WHERE department = 'Sales';
Deletion of all employees in the Sales department.
DELETE FROM employees
WHERE department = 'Sales';
Selection of all employees in the Sales department with a salary greater than 50,000.
SELECT * FROM employees
WHERE department = 'Sales' AND salary > 50000;
The "WHERE" clause in SQL helps filter records based on specific conditions, allowing for targeted data selection, updating, and deletion.
Semantic portal