zoukankan      html  css  js  c++  java
  • OCP-1Z0-051-V9.02-12题

    12. You need to produce a report where each customer's credit limit has been incremented by $1000. In
    the output, t he customer's last name should have the heading Name and the   incremented credit limit
    should be labeled New Credit Limit. The column headings should have only the first letter of each word in
    uppercase .
    Which statement would accomplish this requirement?
    A.

    SELECT cust_last_name Name, cust_credit_limit + 1000     
    "New Credit Limit"
    FROM customers;

    sh@TESTDB> SELECT cust_last_name Name, cust_credit_limit + 1000      
      2  "New Credit Limit" 
      3  FROM customers WHERE ROWNUM<6; 
    
    NAME                                               New Credit Limit
    -------------------------------------------------- ----------------
    Ruddy                                                          2500
    Ruddy                                                          8000
    Ruddy                                                         12000
    Ruddy                                                          2500
    Ruddy                                                         10000


     


    B.

    SELECT cust_last_name AS Name, cust_credit_limit + 1000      
    AS New Credit Limit
    FROM customers;

    sh@TESTDB> SELECT cust_last_name AS Name, cust_credit_limit + 1000       
      2  AS New Credit Limit 
      3  FROM customers WHERE ROWNUM<6; 
    AS New Credit Limit
           *
    ERROR at line 2:
    ORA-00923: FROM keyword not found where expected


     


    C.

    SELECT cust_last_name AS "Name", cust_credit_limit + 1000      
    AS "New Credit Limit"
    FROM customers;

    sh@TESTDB> SELECT cust_last_name AS "Name", cust_credit_limit + 1000       
      2  AS "New Credit Limit" 
      3  FROM customers WHERE ROWNUM<6; 
    
    Name                                               New Credit Limit
    -------------------------------------------------- ----------------
    Ruddy                                                          2500
    Ruddy                                                          8000
    Ruddy                                                         12000
    Ruddy                                                          2500
    Ruddy                                                         10000


     


    D.

    SELECT INITCAP(cust_last_name) "Name", cust_credit_limit + 1000      
    INITCAP("NEW CREDIT LIMIT")
    FROM customers;

    sh@TESTDB> SELECT INITCAP(cust_last_name) "Name", cust_credit_limit + 1000       
      2  INITCAP("NEW CREDIT LIMIT") 
      3  FROM customers WHERE ROWNUM<6;
    INITCAP("NEW CREDIT LIMIT")
           *
    ERROR at line 2:
    ORA-00923: FROM keyword not found where expected

    此题要求选出列标题为Name和New Credit Limit,只有C满足。

    A的Name应加双引号,原型输出

    B/D语法错误

    此题答案选C

  • 相关阅读:
    k8shelm
    利用TweenMax实现贝塞尔曲线运动
    flashPlayer自动降频后webgame处理技巧
    求字符串长度的好方法
    robotlegs 笔记
    pureMVC的svn地址
    完美解决as3在ie中初始化时stageWidth和stageHeight为0的问题
    God of War Ascension / 战神4, 再一次迎来新导演!
    《危情谍战 Knight and Day》又一部好电影!
    未来,突破束缚是唯一的选择?
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317264.html
Copyright © 2011-2022 走看看