I am trying to select g.house\_ID as Distinct so that the values returned by the query below will be unique based on g.house\_id.

So if house ID has 3 record of the value 1. It will only return the 1st entry of house ID and not 3 rows.

```
SELECT  r.*, g.*
FROM house r, pic_gallery g 
WHERE r.house_id = 1 AND r.house_id = g.house_id

```