Question 36

What result set is returned from the following SQL query ? Select customer_name, telephone

What result set is returned from the following SQL query ? Select customer_name, telephone From customers Where city in ('Jaipur','Delhi','Agra');
  1. AThe customer_name of all customers who are not living in Jaipur, Delhi or Agra.
  2. BThe customer_name and telephone of all customers.
  3. CThe customer_name and telephone of all customers living in either Jaipur, Delhi or Agra.
  4. DThe customer_name and telephone of all customers living in Jaipur, Delhi and Agra.
Show answerHide answer

Correct answer: (C) The customer_name and telephone of all customers living in either Jaipur, Delhi or Agra.

Explanation

IN matches any value in the list, so the query returns customer_name and telephone of customers whose city is Jaipur, Delhi or Agra. A customer cannot live in all three cities at once.

From DSSSB TGT Computer Science Practice Set 3

This is question 36 of DSSSB TGT Computer Science Practice Set 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.