1. 程式人生 > >OCP 1Z0 051 V9 02 141題

OCP 1Z0 051 V9 02 141題

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow

也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!

               

141. View the Exhibit and examine the structure of CUSTOMERS and GRADES tables.

You need to display names and grades of customers who have the highest credit limit.

Which two SQL statements would accomplish the task? (Choose two.) 

A. SELECT custname, grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)       

FROM customers) BETWEEN startval and endval;

B. SELECT custname, grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)       

FROM customers) BETWEEN startval and endval   

AND cust_credit_limit BETWEEN startval AND endval;

C. SELECT custname, grade

FROM customers, grades

WHERE cust_credit_limit = (SELECT MAX(cust_credit_limit)                            

FROM customers)

AND cust_credit_limit BETWEEN startval AND endval;

D. SELECT custname, grade

FROM customers , grades

WHERE cust_credit_limit IN (SELECT MAX(cust_credit_limit)                            

FROM customers)

AND MAX(cust_credit_limit) BETWEEN startval AND endval;

Answer: BC

答案解析:

參考:http://blog.csdn.net/rlhua/article/details/12879585

題意要求顯示有最高credit limit的使用者的名稱和等級。

A,缺少 cust_credit_limit BETWEEN startval AND endval這個條件。 BC,使用的非等值連線 D有語法錯誤,WHERE子句裡不能使用組函式

           

給我老師的人工智慧教程打call!http://blog.csdn.net/jiangjunshow

這裡寫圖片描述