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. Readme.MD 例子

    了解一个项目,恐怕首先都是通过其Readme文件了解信息.如果你以为Readme文件都是随便写写的那你就错了.github,oschina git gitcafe的代码托管平台上的项目的Readme. ...

  2. centos7.3 防火墙设置

    1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...

  3. 2015年传智播客JavaEE 第168期就业班视频教程day38-SSH综合案例-1

    为什么需要划分模块呢?因为需要知道一些大致的功能,其次呢需要知道我们后台需不需要对它进行维护.如果需要呢那它肯定是一个单独的模块, 1.1    网上商城需求分析: 1.1.1 前台:用户模块 注册: ...

  4. Jmeter中各种参数化设置的方法

    Jmeter中有较多需要参数化测试的地方: 1.从一个用户登录的接口获取登录后的token值,取值后用于后续接口调用 2.获取用户浏览后的cookies信息,需要用到HTTP Cookie 管理器来为 ...

  5. 5-青蛙的约会(ex_gcd)

    青蛙的约会 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions:122411   Accepted: 25980 Descripti ...

  6. linux环境下pdo加载问题

    报错信息信息 PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20121212/pdo_mysql.so ...

  7. Jdeveloper下Svn的使用

    Jdeveloper下Svn的使用 官方pdf:jdeveloper使用svn 官方网地址:http://www.oracle.com/technetwork/cn/java/subversion-0 ...

  8. Openssl dgst命令

    一.简介 消息摘要可以对任意长度的消息产生固定长度(16或20个字节)的信息摘要,理论基于单向HASH函数,根据消息摘要无法恢复出原文,所以是安全的:消息原文和消息摘要是一一对应的,所以又被称作指纹. ...

  9. C语言源字符集与执行字符集

    参考: http://blog.csdn.net/yucan1001/article/details/7188267   http://blog.csdn.net/dbzhang800/article ...

  10. Oracle学习笔记(十)

    光标(游标)概念引入 就是一个结果集(查询或者其他操作返回的结果是多个时使用)定义一个光标 cursor c1 is select ename from emp: 从光标中取值 打开光标: --ope ...