Bhasker Das
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
By Bhasker Das in SQL Server on Jul 15 2006
  • Rajender Reddy
    Nov, 2006 22

    when we are using group by clause to apply condition on group of rows Having clause will be used.having clause follows Group by clause.

    where clause will be used for condition on single row.

    where clause comes before group by clause

    select empname,salary from employee where empname like '%raj%' group by salary having salary>30000

    • 0
  • farshad
    Aug, 2006 14

    I don't believe there is any difference except that having clause is used if group by clause is used in the query. Otherwise I think you can use a where clause instead.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS