<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="https://stackoverflow.com/questions/2246772/whats-the-difference-between-not-exists-vs-not-in-vs-left-join-where-is-null">What&#39;s the difference between NOT EXISTS vs. NOT IN vs. LEFT JOIN WHERE IS NULL?</a>  </p>
</blockquote>



<p>I need to wite a query that will retrieve the records from Table A , provided that the key in Table A does not exist in Table B.</p>

<p>Any help will be appreciated.</p>

<p>Thanks</p>

```
```
SELECT *
FROM A
WHERE ID NOT IN
     (SELECT ID FROM B)
```
```