【12c OCP】最新CUUG OCP-071考试题库(52题)
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题)的更多相关文章
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)
71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...
- 【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 ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)
69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...
- 【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 ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)
67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)
66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...
- 【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 ...
- 【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 ...
随机推荐
- SourceTree安装和使用
SourceTree 安装 需要注意的是在指定路径下添加一个json文件.就可以跳过身份验证,直接运行软件. SourceTree 的SSH配置 软件启动后,如果需要和远程的Gitlab仓库进行交互, ...
- docker 基本使用和安装提速
https://www.cnblogs.com/Erik_Xu/p/6662936.html#redis >yum install -y docker 道客提速 先安装curl >yum ...
- LInux Centos7 重装yum
Linux yum默认安装python2.7,犹豫2020年之后不更新, 安装python3.6,出现了yum运行失败, 因为yum是依赖python的 1:先删除原有YUM rpm -aq|grep ...
- Remove “Quick Access” entry in Eclipse Juno
Here is a quick hack which doesn't require any plugin installation, instead you just need to add a f ...
- VLC播放RTSP视频延迟问题 (转)
原帖地址:http://blog.chinaunix.net/uid-26611383-id-3755283.html ======================================== ...
- 用logger在控制台打印信息
第一步: 导入jar包,maven项目可以直接添加 <dependency> <groupId>log4j</groupId> <artifactId> ...
- 使用ES-Hadoop 6.5.4编写MR将数据索引到ES
目录 1. 开发环境 2. 下载地址 3. 使用示例 4. 参考文献 1. 开发环境 Elasticsearch 6.5.4 ES-Hadoop 6.5.4 Hadoop 2.0.0 2. 下载地址 ...
- 命名空间p方式的属性注入
---------------------siwuxie095 命名空间 p 方式的属性注入 命名空间 p 方式的属性注入是 Spring 2.x 版本后提供的方式 1.编写一个普通类 Book.ja ...
- XAMPP非本地访问被拒绝解决办法
问题场景: 本机搭建一个apache服务器,正常访问XAMPP目录下的页面. 手机接入同一wifi,以电脑ip方式访问该目录下的页面:提示:Access Denied Access to the re ...
- strops()
<?php echo strpos("You love php, I love php too!","php"); ?>