Given the People table:
ID        FirstName        LastName        Sex
---------------------------------------------------------
1         John             Reyna           M
2         Jake             Wild            M
3         Cathy            Armstrong       F
4         Jake             Earl            M 
How many records will the following query return?
SELECT ID, Sex 
FROM PEOPLE 
WHERE (FirstName='John' AND FirstName='Jake')
OR LastName='Wild'
Explanation
FirstName='John' AND FirstName='Jake' condition cannot be satisfied as FirstName can have only one value at a time.
Therefore, query will return values only for the record with LastName='Wild'

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes