OCP 1Z0 051 21

21. Examine the description of the EMP_DETAILS table given below: 
name               NULL                 TYPE 
EMP_ID             NOT NULL             NUMBER 
EMP_NAME           NOT NULL             VARCHAR2 (40) 
EMP_IMAGE                              LONG 
Which  two  statements  are  true  regarding SQL statements  that  can  be  executed  on  the EMP_DETAIL 
table? (Choose two.) 
A. An EMP_IMAGE column can be included in the GROUP BY clause. 
B. An EMP_IMAGE column cannot be included in the ORDER BY clause. 
C. You cannot add a   new column to the table with LONG as the   data type. 
D. You can alter the table to include the   NOT NULL constraint on the EMP_IMAGE column. 

为什么老是考long.这是个不建议使用的类型

SQL> CREATE TABLE emp_details
  2  (
  3  emp_id NUMBER NOT NULL,
  4  emp_name VARCHAR2(40) NOT NULL,
  5  emp_image LONG
  6  );
Table created

SELECT emp_image FROM emp_details GROUP BY emp_image
ORA-00997: 非法使用 LONG 数据类型

SELECT emp_image FROM emp_details ORDER BY emp_image
ORA-00997: 非法使用 LONG 数据类型

ALTER TABLE emp_details ADD new_col LONG
ORA-01754: 表只能包含一个 LONG 类型的列

SQL> ALTER TABLE emp_details MODIFY emp_image NOT NULL;
Table altered


Answer: BC 

你可能感兴趣的:(OCP 1Z0 051 21)