1.

List down the difference between WHERE and HAVING clause.

Answer»

The WHERE clause is the most widely used command in SQL and used for filtering records on the result set. The HAVING clause does the same THING but on the grouped result set. The WHERE clause will be executed FIRST before having a clause trigger. Let me try to explain the differences with examples. Any SQL statement FOLLOWS below syntax:

The order of execution of SQL statements follows from top to bottom. It implies that records are filtered first on the WHERE clause and once the result set is grouped, HAVING clause comes into the picture.



Discussion

No Comment Found