12.You need to produce a report where each customer's credit limit has been incremented by $1000. In

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?
A.SELECT cust_last_name Name, cust_credit_limit + 1000 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;
答案:C
解析:这道题考察的数据结构命名
1.数据结构命名只能是数字,字母,$,_,#,必须字母开头,长度不能超过30个字符,如果包括其他字符的时候使用""括起来
就可以了,但是长度不能超过30个字符,
2.如果不加"",那么数据结构的名字都会变成大写
A:错误,Name会变成NAME
B:错误,Name会变成NAME
C:正确
D:错误,INITCAP("NEW CREDIT LIMIT") 这里的双引号使用错误,双引号只能用在数据结构名称上

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值