OCP-1Z0-051-题目解析-第12题

12. You need to produce a report where each customer‘s credit limit has been incremented by $1000. In
the output, the 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?

(题意:你需要制作一个报表,该表报中顾客的credit limit需要加1000,顾客名称字段的标题名称为Name,新credit limit的标题名称为 New Credit Limit,这三个单词要首字母大写。问下面的哪条语句符合上面的要求?)
A.
SELECT cust_last_name Name, cust_credit_limit + 1000
"New Credit Limit"
FROM customers;
B.
SELECT cust_last_name AS Name, cust_credit_limit + 1000
AS New Credit Limit
FROM customers;
C.
SELECT cust_last_name AS "Name", cust_credit_limit + 1000
AS "New Credit Limit"
FROM customers;
D.
SELECT INITCAP(cust_last_name) "Name", cust_credit_limit + 1000
INITCAP("NEW CREDIT LIMIT")
FROM customers;

Answer: B

题目解析:

这道题是关于字段标题是否加双引号的问题,关于双引号的使用规则如下:

1.如果字段名称是多个单词组成,中间有空格,如New Credit Limit,则必须加双引号,否则会报错。
2.如果标题名称是一个单词或多个连续的单词,如果不加双引号,则输出的格式是完全大写的,如选项A,就会输出NAME。
   如果加双引号则会原样输出,如选项C会输出 Name
综上所述,所以这道题的正确答案是C
D选项中的initcap函数不可用于字段名称,是语法错误。

OCP-1Z0-051-题目解析-第12题

时间: 2024-07-29 19:35:40

OCP-1Z0-051-题目解析-第12题的相关文章

PTA 基础编程题目集 -函数12题

 4-1 简单输出整数   (10分) void PrintN(int N) { int i,sum=0; for(i=1; i<=N; i++) printf("%d\n",i); } 4-2 多项式求值   (15分) double f( int n, double a[], double x ) { int i; double sum; for(i=0; i<=n; i++) { if(i==0) sum+=a[i]; else if(i==1) sum+=a[i

Oracle OCP 11G 051(61题版本)答案解析目录

Oracle OCP 11G 051(61题版本)答案解析目录 61题版本 V9.02 1 http://blog.csdn.net/rlhua/article/details/17635843 2  http://blog.csdn.net/rlhua/article/details/17635887 3 http://blog.csdn.net/rlhua/article/details/17635919 86 4 http://blog.csdn.net/rlhua/article/det

英雄会题目解析- 第五届在线编程大赛月赛第三题:石子游戏

题目: 甲乙两人面对若干堆石子,其中每一堆石子的数目可以任意确定.两人轮流按下列规则取走一些石子,游戏的规则如下:1.每一步应取走至少一枚石子:2.每一步只能从某一堆中取走部分或全部石子:3.如果谁无法按规则取子,谁就是输家.如果甲乙两人都采取最优的策略,甲先拿,请问,是甲必胜还是乙必胜.输入格式:多组数据,每组数据两行,第一行是一个整数N, 2<=N<=10000下一行是N个正整数,代表每堆的石子数,石子数在32位整数内.输出格式:每组测试数据输出一行,如果甲存在必胜策略,输出"W

增量备份,11g052题目解析

增量备份分为差异备份(differential incremental backup)和累积备份(cumulative incremental backup),这是两种执行增量备份操作的不同方法. 80. You perform differential incremental level 1 backups of your database on each working day and level 0 backup on Sundays, to tape. Which two stateme

There&#39;s Treasure Everywhere! poj1473题目解析

题目: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 总时间限制:  1000ms 内存限制:  65536kB 描述 Finding buried treasures is simple: all you need is a map! The pirates in the Caribbean were famous for their enormous buried treasures and their elaborate maps

OCP-1Z0-051-题目解析-第10题

10. View the Exhibit and examine the structure of the PROMOTIONS table. Each promotion has a duration of at least seven days . Your manager has asked you to generate a report, which provides the weekly cost for each promotion done to l date. Which qu

OCP-1Z0-051-题目解析-第11题

11. View the Exhibit and examine the structure of the PRODUCTS table.All products have a list price. You issue the following command to display the total price of each product after a discount of 25% and a tax of 15% are  applied on it. Freight charg

OCP-1Z0-051-名称解析-文章12称号

12. You need to produce a report where each customer's credit limit has been incremented by $1000. In the output, the customer's last name should have the heading Name and the incremented credit limit should be labeled New Credit Limit. The column he

OCP-1Z0-051-题目解析-第1题

1. View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES tables. The PROD_ID column is the foreign key in the SALES table, which references the PRODUCTS table. Similarly, the CUST_ID and TIME_ID columns are also fore