52、(12-11) choose the best answer:

Examine the structure and data in the PRICE_LIST table:

You plan to give a discount of 25% on the product price and need to display the discount amount

in the same format as the PROD_PRICE.

Which SQL statement would give the required result?

A) SELECT TO_CHAR (TO_NUMBER (prod_price)*.25, '$99,999.00')

FROM PRICE_LIST;

B) SELECT TO_CHAR(prod_price*.25, '$99,999.99')

FROM PRICE_LIST;

C) SELECT TO_CHAR(TO_NUMBER(prod_price,'$99,999.99')*.25,'$99,999.00')

FROM PRICE LIST;

D) SELECT TO_NUMBER (TO_NUMBER(prod_price, '$99,999.99')*.25, '$99,999.00')

FROM PRICE_LIST;

Answer:A

(解析:其实 B 答案也可以实现要求,但是它不是最好的,这里需要 to_number 转换函数,因为 prod_price 本身是 varchar2 类型,可以用如下语句实验:

SELECT TO_CHAR(to_number(sal)*.25, '$99,999.99')

FROM emp;

)

【12c OCP】最新CUUG OCP-071考试题库(52题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)

    70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)

    68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. 【OCP 12c】最新CUUG OCP-071考试题库(64题)

    64.(22-7) choose the best answer: View the Exhibit and examine the structure of the ORDERS and ORDER ...

  10. 【OCP 12c】最新CUUG OCP-071考试题库(63题)

    63.(22-4) choose the best answer: View the Exhibit and examine the data in the PRODUCTS table. Which ...

随机推荐

  1. Eclipse apk 签名

    Eclipse apk 签名 project>right mouse click>android tool>Export signed Application package cre ...

  2. 新手C#s.Split(),s.Substring(,)以及读取txt文件中的字符串的学习2018.08.05

    s.split()用于字符串分割,具有多种重载方法,可以通过指定字符或字符串分割原字符串成为字符串数组. //s.Split()用于分割字符串为字符串数组,StringSplitOptions.Rem ...

  3. Thrift 实现 JAVA,PHP,C#,Python 互相通信

    Thrift介绍   https://www.ibm.com/developerworks/cn/java/j-lo-apachethrift/index.html 首先需要下载 Thrift.exe ...

  4. Java项目的结构

    -------siwuxie095             以 Hello World 为例     这个工程用一个文件夹表示,被放置在左侧的资源管理面板 Package Explorer 中     ...

  5. PHP 中 Traits 的简单使用

    PHP 5.4中的traits,是新引入的特性,中文还真不知道如何准确翻译好.其实际的目的,是为了有的场合想用多继承,但PHP又没多继承,于是就发明了这样的一个东西.       Traits可以理解 ...

  6. [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] HashSet and Hashtable

    Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add(&qu ...

  7. Redis 安装配制

    Redis 安装配制 redis 安装分为单机安装.伪集群安装.集群安装. Redis 下载地址:http://www.redis.cn/download.html Redis 在线测试工具:http ...

  8. asp.net 在自己指定的文件夹下面弄个App.config来读取配置

    .注意首先你要在你的应用程序的根目录下面新建一个Config的文件夹,然后在你新建的Config文件夹下面建立一个MyApp.config文件,根据标准的App.config复制一个过来稍作修改就好, ...

  9. iOS's GCD Note

    [iOS's GCD Note] 1.默认有四种全局concureent queue,如下: 通过以下函数来引用: 2.官方文档上并发队列有3种,实际上main就是serial. 1)serial,用 ...

  10. Smart Thread Pool (智能线程池)

    STPStartInfo stp = new STPStartInfo();   stp.DisposeOfStateObjects = true;   stp.CallToPostExecute = ...