当前位置: 代码迷 >> Oracle认证考试 >> 批改列语句,为什么选B呢
  详细解决方案

批改列语句,为什么选B呢

热度:9949   发布时间:2013-02-26 00:00:00.0
修改列语句,为什么选B呢?
The EMPLOYEES table has these columns:

LAST_NAME VARCHAR2(35)
SALARY NUMBER(8,2)
HIRE_DATE DATE
Management wants to add a default value to the SALARY column. You plan to alter the table by using
this SQL statement:
ALTER TABLE EMPLOYEES
MODIFY (SALARY DEFAULT 5000);
Which is true about your ALTER statement?

A. Column definitions cannot be altered to add DEFAULT values.
B. A change to the DEFAULT value affects only subsequent insertions to the table.
C. Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
D. All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
Answer: B
------解决方案--------------------------------------------------------
引用:
引用楼主 manlibie 的帖子:
The EMPLOYEES table has these columns: 

LAST_NAME VARCHAR2(35) 
SALARY NUMBER(8,2) 
HIRE_DATE DATE 
Management wants to add a default value to the SALARY column. You plan to alter the table by using 
this SQL statement: 
ALTER TABLE EMPLOYEES 
MODIFY (SALARY DEFAULT 5000); 
Which is true about your ALTER statement? 

A. Column definitions cannot be altered …

学习了
------解决方案--------------------------------------------------------
B. A change to the DEFAULT value affects only subsequent insertions to the table. 
默认值仅对新插入的记录有效
C. Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type. 
栏位定义默认值时,默认值不能加到已存在值的栏位里

译不太好;
两个语句在理解上觉得意思一样,但觉得B更有说服力
  相关解决方案