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. Guidelines for Installing Oracle HR Sample Schemas

    All scripts necessary to install sample schemas reside in $ORACLE_HOME/demo/schema directory. Before ...

  2. java.lang.NoClassDefFoundError: weblogic/kernel/KernelStatus

    solution Step: 1.In the classpath tab, be sure to add the wlclient.jar file located here \wlserver_1 ...

  3. 【320】Python 2.x 与 3.x 的区别

    通过代码移植的报错进行梳理! 1. print 函数的区别 Python 2.x 中可以加空格或者括号,但是 Python 3.x 只能是括号的 # Python 2.x >>> p ...

  4. 创建maven版的java工程

    步骤如下: 1.第一步 2.第二步: 3.第三步:

  5. orchard cms 项目迁移

    删除Orchard.Web  下的 App_Data 目录,重新安装项目

  6. python初步要点II

    [python初步要点II] 1.is & is not 操作符用于测试2个对象是否指向同一个对象,即 id(a) == id(b). 2.整形和字符串对象是不可变对象,python会高效地缓 ...

  7. ADT离线安装

    1.安装eclipse软件.安装后点击HELP菜单,找到下面的Install New Software并点击. 2.之后会弹出一个对话框,然后我们点击add,接下来弹出ADD对话框,然后我们再点击ar ...

  8. AFNetworking 不支持 text/plain,unacceptable content-type: text/plain

    1. 用AFNetworkingPOST传递参数(获取微博的accessToken)的时候,具体代码如下: AFHTTPSessionManager *session = [AFHTTPSession ...

  9. VMTurbo:应对散乱虚拟机的强劲工具

    随着服务器虚拟化技术越来越成熟,虚拟机散乱(VM sprawl)和主机资源管理成为了虚拟化数据中心的管理员眼里的两大问题.面对这种情形,一种可行的解决办法就是使用一款名为VMTurbo(vmturbo ...

  10. Gym 101201J Shopping (线段树+取模)

    题意:给定 n 个物品,然后有 m 个人买东西,他们有 x 元钱,然后从 l - r 这个区间内买东西,对于每个物品都尽可能多的买,问你最少剩下多少钱. 析:对于物品,尽可能多的买的意思就是对这个物品 ...