What is the difference between a HAVING CLAUSE and a WHERE
CLAUSE?
Answer Posted / ravindran
1.WHERE clause can be used with SELECT,INSERT and UPADATE statements,where as HAVING clause can only be used with the SELECT statements.
2.WHERE filter after rows before aggregation(GROUPING),
where as,HAVING filters groups,after the aggregations are performed.
3.Aggregate functions cannot be used in the WHERE clause,unless it is in a sub query containing in a HAVING clause,where as,aggregate functions can be used in having clause.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can a table have 2 foreign keys?
What are the default system databases in sql server 2000?
Can we add an identity column to decimal datatype?
What is normalization of database?
How to verify a login name with sqlcmd tool?
What is a trigger in sql server?
Explain sub-query?
What is data file in computer?
What is 4nf in normalization form?
What is in place upgrade in sql server?
How is table type constraint applied to a table?
What is the difference between insensitive and scroll cursor?
What are the different types of Indexes available in SQL Server?
What is difference between join and natural join?
Explain user defined views?