Examine the description of the EMP_DETAILS table given below: Exhibit: Which two
statements are true regarding SQL statements that can be executed on the EMP_DETAIL
table? (Choose two.)
A.
You cannot add a new column to the table with LONG as the data type
B.
An EMP_IMAGE column cannot be included in the ORDER BY clause
C.
You can alter the table to include the NOT NULL constraint on the EMP_IMAGE column
D.
An EMP_IMAGE column can be included in the GROUP BY clause
Can anyone explain why option 3 is incorrect?
Actually im not sure but maybe could be a null values in emp_image column and if you add a not null constraint database cannot accept it.
CREATE TABLE EMP_DETAIL
(EMP_ID NUMBER NOT NULL,
EMP_NAME VARCHAR2(40) NOT NULL,
EMP_IMAGE LONG);
Table EMP_DETAIL criado.
DESCRIBE EMP_DETAIL;
Nome Nulo Tipo
——— ——– ————
EMP_ID NOT NULL NUMBER
EMP_NAME NOT NULL VARCHAR2(40)
EMP_IMAGE LONG
ALTER TABLE EMP_DETAIL MODIFY (EMP_IMAGE NOT NULL);
Table EMP_DETAIL alterado.
ALTER TABLE EMP_DETAIL ADD (EMP_IMAGE2 LONG );
Erro a partir da linha : 9 no comando –
ALTER TABLE EMP_DETAIL ADD (EMP_IMAGE2 LONG )
Relatório de erros –
Erro de SQL: ORA-00604: ocorreu um erro no nível 1 SQL recursivo
ORA-06502: PL/SQL: erro numérico ou de valor
ORA-06512: em line 8
ORA-01754: uma tabela só pode conter uma coluna do tipo LONG
00604. 00000 – “error occurred at recursive SQL level %s”
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.