Where Clause | Having Clause |
WHERE clause can be used with • SELECT • INSERT • UPDATE • DELETE | Having clause can only be used with only SELECT With other DDL commands you will get incorrect syntax error |
WHERE clause is used for filtering rows and it applies on each and every row | HAVING clause is used to filter groups in SQL. |
WHERE clause can be used before or after GROUP BY clause | HAVING clause is used after GROUP BY clause. |
We can't use aggregate functions in the where clause unless it is in a sub query contained in a HAVING clause. | We can use aggregate function in HAVING clause |
Difference between Where and Having clause
Subscribe to:
Post Comments (Atom)
Nice information thank you so much.
ReplyDeleteSQL Server Training in Hyderabad
Thanks Learned a lot of new things from your post! Good creation and hats off to the creativity of your mind.
ReplyDeleteVery interesting and useful blog! For more info:
Manual Testing Training in Hyderabad