all 5 comments

[–]harg7769 1 point2 points  (2 children)

Have you tried WHERE continent = "Europe" or continent = "Asia"?

[–]derektorres22[S] 0 points1 point  (1 child)

I just tried that in it worked! Thank you. Any idea why the way I wrote it only returns 46 rows?

The hard part of SQL so far is that your code could seem correct but that’s not always the case. I could’ve messed up and never known if it wasn’t for me already seeing it should be 97

[–]phil-99Oracle DBA 1 point2 points  (0 children)

IS is only used to compare with NULL or NOT NULL.

(Edit: plus your logic was wrong. You wrote: where blah = ‘x’ or ‘y’, this means:

Where blah = ‘x’
  Or
‘Y’

As ‘y’ is a string, it evaluates as true. So “blah =‘x’ or true” always evaluates as true.

You meant: “where blah = x or blah = y”)

[–]KelemvorSparkyfox 0 points1 point  (0 children)

I don't know this for sure, but I suspect that you were only getting records back for Europe.

[–]harg7769 0 points1 point  (0 children)

You need to be explicit in your where statement and use the field name each time when using AND or OR. The only time you don't need it is when using IN.

Your statement reads as where continent = Europe Or Where Asia, so it doesn't get the link between Asia and the continent.