Pages

Showing posts with label HAVING. Show all posts
Showing posts with label HAVING. Show all posts

11 August 2013

SQL- WHERE and HAVING

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


MarksInfo Table
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.