Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1037061
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

分类: Oracle

2015-06-20 19:37:25

15. View the Exhibit and examine the data in the CUSTOMERS table. 
Evaluate the following query:
SQL>  SELECT  cust_name  AS  "NAME",  cust_credit_limit/2  AS  MIDPOINT,MIDPOINT+100  AS  "MAX
LOWER LIMIT"
FROM customers;
The above query produces an error on execution.
What is the reason for the error?


A. An alias cannot be used in an expression.
B. The a lias NAME should not be enclosed with in double quotation marks .
C.  The  MIDPOINT+100  expression   gives  an  error  because   CUST_CREDIT_LIMIT  contains  NULL
values.
D.  The  a  lias  MIDPOINT  should  be  enclosed  with  in  double  quotation  marks   for  the
CUST_CREDIT_LIMIT/2 expression .
Answer: A

AS后面需要加""

阅读(1035) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~