Q What is the difference between WHERE and HAVING clause ?
WHERE clause is used to filter rows before aggregation or grouping of rows has been done. WHERE can be used in other than SELECT clause like UPDATE,DELETE etc.
Consider the below MarksInfo table for illustration
In the below snapshot, the use of WHERE clause has been demonstrated. We are filtering the records based on condition in WHERE clause. Here, we are displaying only those records which have Marks greater than 80.
WHERE clause is used to filter rows before aggregation or grouping of rows has been done. WHERE can be used in other than SELECT clause like UPDATE,DELETE etc.
Consider the below MarksInfo table for illustration
![]() |
| MarksInfo Table |
