Why My Query Is Not Giving Me Exact Result


#1

select DISTINCT reviewer_name from reviewers
inner join ratings on reviewers.reviewer_id = ratings.reviewer_id
and reviewer_stars=null;


#2

use is NULL instead of =null


#3

Use IS NULL instead of = NULL


#4

where reviewer_star is null
use this


#5

SELECT reviewer_name
FROM reviewers
INNER JOIN ratings USING(reviewer_id)
WHERE reviewer_stars IS NULL;


#6

you have to access reviewer_stars as ratings.reviewer_stars


#7

this happening because your using =null but this is not support =null
select reviewer_name from reviewers inner join ratings using (reviewer_id)
where reviewer_stars is NULL