<p>What is the difference between <code>HAVING</code> and <code>WHERE</code> in an <code>SQL SELECT</code> statement?</p>
<p>EDIT: I have marked Steven's answer as the correct one as it contained the key bit of information on the link:</p>
<blockquote>
<p>When <code>GROUP BY</code> is not used, <code>HAVING</code> behaves like a <code>WHERE</code> clause</p>
</blockquote>
<p>The situation I had seen the <code>WHERE</code> in did not have <code>GROUP BY</code> and is where my confusion started. Of course, until you know this you can't specify it in the question.</p>

```
HAVING
```
is used when you are using an aggregate such as
```
GROUP BY
```
.
```
```
SELECT edc_country, COUNT(*)
FROM Ed_Centers
GROUP BY edc_country
HAVING COUNT(*) > 1
ORDER BY edc_country;
```
```