一、原题
二、题目翻译
要求生成一个报表,该报表显示每一个客户的信贷限额增加$1000后的结果,客户的last name列标题应显示为Name,并且增加的信贷限额列标题应显示为New Credit Limit,列标题应该每个单词的首字母大写显示。
哪个命令能完成该需求?
三、题目解析
A选项不正确,Name需要加双引号,不加会显示为name。
B选项不正确,两个都需要加双引号,Name不加双引号,会显示为name,后面的New Credit Limit不加双引号,因为中间有空格,会报错。
C选项,正确。
D选项不正确,别名不能使用INITCAP("NEW CREDIT LIMIT")。
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?
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 + 100 AS "New Credit Limit"
FROM customers;
D. SELECT INITCAP(cust_last_name) "Name", cust_credit_limit + 1000 INITCAP("NEW CREDIT LIMIT")
FROM customers;
答案:C
二、题目翻译
要求生成一个报表,该报表显示每一个客户的信贷限额增加$1000后的结果,客户的last name列标题应显示为Name,并且增加的信贷限额列标题应显示为New Credit Limit,列标题应该每个单词的首字母大写显示。
哪个命令能完成该需求?
三、题目解析
A选项不正确,Name需要加双引号,不加会显示为name。
B选项不正确,两个都需要加双引号,Name不加双引号,会显示为name,后面的New Credit Limit不加双引号,因为中间有空格,会报错。
C选项,正确。
D选项不正确,别名不能使用INITCAP("NEW CREDIT LIMIT")。