Filtering (WHERE clause)
Filtering means → only certain rows are selected based on a condition.
SELECT name, salary
FROM Employee
WHERE salary > 55000;
Output:
| name | salary |
|---|---|
| Priya | 60000 |
| Meena | 58000 |
| Arun | 62000 |
Sorting (ORDER BY clause)
Sorting means → arrange rows in ascending (ASC) or descending (DESC) order.
SELECT name, salary
FROM Employee
ORDER BY salary DESC;
See you soon in the next topic!.......
Top comments (0)