nerdexam
Oracle

1Z0-071 · Question #213

View the Exhibit and examine the structure of the CUSTOMERS table. You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and…

The correct answer is C. Only the first query gives the correct result. See the full explanation below for the reasoning.

Question

View the Exhibit and examine the structure of the CUSTOMERS table. You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and credit limit is below 10,000. Evaluate the following two queries:

SQL> SELECT cust_last_name, cust_credit_limit FROM customers WHERE (UPPER(cust_last_name) LIKE ‘A%’ OR UPPER (cust_last_name) LIKE ‘B%’ OR UPPER (cust_last_name) LIKE ‘C%’) AND cust_credit_limit < 10000; SQL>SELECT cust_last_name, cust_credit_limit FROM customers WHERE UPPER (cust_last_name) BETWEEN ‘A’ AND ‘C’ AND cust_credit_limit < 10000; Which statement is true regarding the execution of the above queries?

Exhibit

1Z0-071 question #213 exhibit

Options

  • AOnly the second query gives the correct result
  • BBoth execute successfully but do not give the required result
  • COnly the first query gives the correct result
  • DBoth execute successfully and give the same result

How the community answered

(57 responses)
  • A
    14% (8)
  • B
    5% (3)
  • C
    77% (44)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice