ocp-1z0-051 62 Questions Personal understanding

Source: Internet
Author: User

First, the original question

View the Exhibit and examine the structure of the CUSTOMERS table.
Want to generate a report showing the last names and credits limits of all customers whose last namesstart with A, B, or C, and credits limit is below 10, 000.
Evaluate the following and the queries:
Sql> SELECT Cust_last_name, Cust_credit_limit
From customers
WHERE (UPPER (cust_last_name) like ' A% ' or UPPER (cust_last_name) as ' 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?
650) this.width=650; "Src=" http://img.blog.csdn.net/20140429124801234?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvag9sbhkymda4/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
A. Only the first query gives the correct result.
B. Only the second query gives the correct result
C. Both execute successfully and give the same result.
D. Both execute successfully but does not give the required result.

Answer:A

Personal Understanding:

The first condition of the topic, requires the return of the letter A,b,c the beginning of the customer name, query two did not return to meet the requirements of the results, explanation of reason there is a variety of understanding. According to personal understanding, the second query returns the beginning of A and B (including case!). The user name of all and single letter C (including Case c).

In fact, I think there is a problem, since only the first letter, it is customary to use the upper function, because the first letter by convention is already capitalized, (here with Initcap is not a better understanding?) that uses the upper function, does that mean returning names that start with lowercase a, B, and C? (The table also does not indicate that the field qualification must start with a capital letter, the formula can not directly default it) and the problem is just to ask for the beginning of capital letters, using the upper query to determine how to return only the beginning of capital letters?? Unless there is another explanation, the ABC letter without double quotation marks is uppercase and small, and the double quotation mark means that it contains only uppercase??

ocp-1z0-051 62 Questions Personal understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.