Posts

Showing posts from November, 2020

What is the difference between where and having clause

Where and Having both are used for filter purpose. Then what is the difference between them in sql statement. The below table will summarize the difference between them. WHERE HAVING WHERE Clause is used to filter the records from the table or used while joining more than one table.Only those records will be extracted who are satisfying the specified condition in WHERE clause. HAVING Clause is used to filter the records from the groups based on the given condition in the HAVING Clause. Those groups who will satisfy the given condition will appear in the final result. WHERE Clause can be used without GROUP BY Clause. HAVING Clause cannot be used without GROUP BY Clause. WHERE Clause implements in row operations. HAVING Clause implements in column operation. WHERE Clause cannot contain aggregate function. HAVING Clause can contain aggregate function. WHERE Clause can be used with SELECT, UPDAT...
Back To Top