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