I have this Table (tblExample
):
ID U_ID Title Desc Cat SubCat Country Date
----------------------------------------------------------------------------
1 2 Title1 Desc1 Orange Blue England 12/05/2015
2 3 Title2 Desc2 Orange Blue England 12/05/2015
3 2 Title3 Desc2 Orange Blue England 12/05/2015
I then have another table (tblRating
):
ID U_ID rating
------------------
1 2 4
2 2 2
3 2 4
If I do an SQL statement like:
select e.*, r.*
from tblExample e
inner join tblRating r on e.U_ID = r.U_ID
The result I get is just the details of U_ID = 2
, but I want to still show U_ID = 3
, this is the user that has no record in tblRating
. How can I do this? I tried left join
but did not work.