<p>How can I make:</p>

<p>DELETE FROM foo WHERE id=1 AND <strong>bar not contains id==1</strong></p>

<p>To elaborate, how can I remove a row with <code>id = 1</code>, from table <code>foo</code>, only if there is not a row in table <code>bar</code> with <code>id = 1</code>.</p>

```
```
DELETE FROM foo WHERE id=1 AND NOT EXISTS (SELECT * FROM bar WHERE id=1)
```
```
I'm assuming you mean that foo and bar are tables, and you want to remove a record from foo if it doesn't exist in bar.