Question: SO I have two table connecting each other

```
TABLE Admin_Evaluate
EvalID int primary key,
EvalStatus tinyint,
UserID int (foreign to user)

TABLE Items
ItemID int primary key,
EvalID (foreign to Admin_Evalulate)

Sample Data:

| TABLE Admin Evaluate |
 ---------------------------------------------
 EvalID | EvalStatus | UserID
   1         0           5
   2         1           5
   3         0           5
   4         1           5
   5         1           5
   6         1           5

 | TABLE Items |
 ----------------------------------------------
 ItemID  | EvalID 
   1         2
   2         4

```

So basically I want to retrieve the **EvalID** where EvalStatus = 1 and UserID = 5 AND **DOESN'T EXISTS** in the **Table Items**

The results should be **EvalID 5 and 6**

Thanks in advance :)

Answer: 
This can be done with a left join:

```
SELECT t.evalID FROM Admin_Evaluate t
LEFT OUTER JOIN Items s
 ON(t.evalID = s.evalID)
WHERE s.evalID is null
  AND t.evalstatus = 1
  and t.userID = 5

```
You can use Left join :

```
SELECT * FROM Admin_Evaluate a LEFT JOIN Items i ON i.EvalId = a.EvalId WHERE EvalStatus = 1 AND UserID = 5 AND i.EvalId is NULL;

```