Combining Conditions in SQL – Quiz

For each question below, select the best answer. To select the best answer, click on the circle located on the left of this answer. When all questions are answered, click on the Submit button

Question 1

With the condition “where account_type = 'key_account'
and city='bangalore'
“, which of the following set of account type/city combinations is acceptable?:
(key_account, bangalore),(key_account, delhi).
(key_account, bangalore),(key_account, bangalore).
(standard_account, bangalore),(key_account, bangalore).
All above combinations are acceptable.

Question 2

With the condition “where account_type = ‘key_account’ or city=’bangalore’ “, which of the following sets of account type/city combinations are acceptable?:
(key_account, bangalore),(key_account, delhi),(standard_account, bangalore).
(key_account, bangalore),(key_account, delhi),(standard_account, delhi).
(standard_account, bangalore),(standard_account, cochin).

Question 3

Can there be a difference between “where account_type = 'key_account'
or city='bangalore
‘ and “where city='bangalore'
or account_type = 'key_account'
“? Choose the best answer:
No, the same results are returned.
Yes,it does not return the same result.
The same results are returned but it can influence the query speed.
The same results are returned but it can influence the database reliability.



Once you have completed the quiz, calculated your score and reviewed your answers, I invite you to go to the next lesson: Combine OR and AND in SQL.
Share on:

Last udpated: September 10, 2017
Created: September 2, 2014