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

OCP-1Z0-051-V9.02-15題

15. View the Exhibit and examine the data in the CUSTOMERS table. 
Evaluate the following query:
SQL> SELECT cust_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,MIDPOINT+100 AS "MAX
LOWER LIMIT"
FROM customers;
The above query produces an error on execution.
What is the reason for the error? 

A. An alias cannot be used in an expression.
B. The a lias NAME should not be enclosed with in double quotation marks .
C. The MIDPOINT+100 expression  gives an error because  CUST_CREDIT_LIMIT contains NULL
values.
D.  The  a  lias  MIDPOINT  should  be  enclosed  with  in  double  quotation  marks   for  the
CUST_CREDIT_LIMIT/2 expression .

[email protected]> SELECT cust_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,MIDPOINT+100 AS "MAX 
  2  LOWER LIMIT" 
  3  FROM customers; 
SELECT cust_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,MIDPOINT+100 AS "MAX
                                                            *
ERROR at line 1:
ORA-00904: "MIDPOINT": invalid identifier


報錯,select中不應該用別名來用在表示式裡

[email protected]> SELECT cust_last_name AS "NAME", cust_credit_limit/2 AS MIDPOINT,cust_credit_limit/2+100 AS "MAX LOWER LIMIT"
  2  FROM customers WHERE ROWNUM<6;

NAME                                                 MIDPOINT MAX LOWER LIMIT
-------------------------------------------------- ---------- ---------------
Ruddy                                                     750             850
Ruddy                                                    3500            3600
Ruddy                                                    5500            5600
Ruddy                                                     750             850
Ruddy                                                    4500            4600


此題答案選A

相關推薦

OCP-1Z0-051-V9.02-15

15. View the Exhibit and examine the data in the CUSTOMERS table.  Evaluate the following query: SQL> SELECT cust_name AS "NAME", cu

OCP 1Z0 051 V9 02 73

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP 1Z0 051 V9 02 5

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP 1Z0 051 V9 02 104

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP 1Z0 051 V9 02 141

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP 1Z0 051 V9 02 105

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP 1Z0 051 V9 02 13

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP-1Z0-051-V9 02-9

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP-1Z0-051-V9 02-102

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP-1Z0-051-V9 02-95

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

OCP-1Z0-051-V9 02-2

幽默 ons which 原因 解析 table fonts 教程 The 2. View the Exhibit to examine the description for the SALES table. Which views can have all DM

OCP-1Z0-051-V9 02-100

100. View the Exhibit and examine the structure of the PROMOTIONS table. Which SQL statements are valid?  (Choose all that apply.) 

OCP-1Z0-051-V9 02-105

105. Examine the structure of the PROMOS table: name              Null &nbs

OCP-1Z0-051-V9 02-88

                88. You need to calculate the number of days from 1st January 2007 till date.Dates are stored in the default format of dd-mon-rr. Which SQL

OCP-1Z0-051-V9 02-141

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

OCP-1Z0-051-V9.02-134

134. Where can subqueries be used? (Choose all that apply.) A. field  names in the  SELECT statement  標量子查詢 B. the  FROM clause in the  S

OCP-1Z0-051-V9.02-148

148. View the Exhibit and examine the structure of the PRODUCTS tables. You want to generate a report that displays the average list pri

OCP-1Z0-051-V9.02-51

51. Which statement is true regarding synonyms? A. Synonyms can be created only   for a table.  不只是表,schema object B. Synonyms are used t

OCP-1Z0-051-V9.02-37

37. You issued the following command to drop the PRODUCTS table: SQL> DROP TABLE products; What is the implication of this command? (C

OCP-1Z0-051-V9.02-93

93. View the Exhibit and examine the structure of the CUSTOMERS table. Using the CUSTOMERS table, y ou need to generate a report that sho