SQL Server Performance

Diffrence between a "where" clause and a "having"

Discussion in 'General DBA Questions' started by sramesh, Mar 3, 2006.

  1. sramesh New Member

    any body clear my doubt
    Diffrence between a "where" clause and a "having" clause
  2. FrankKalis Moderator

  3. Madhivanan Moderator

    You can compare column values in Where and aggregate values in Having


    Select columns from yourTable
    where col='somevalue'
    group by columns
    Having count(*)>5


    Failing to plan is Planning to fail

Share This Page