Multiple choice

Which of the following are not legal?1) DECLARE V_Destination_India Number;2) DECLARE V_123, V_213, V_132 Varchar2(10);3) DECLARE V_sys Boolean := 1;4) DECLARE V_destination_India Number(4);5) DECLARE V_Hiredate NOT NULL DATE := '01-JAN-00';

  1. 1, 3, 5

  2. 1, 2, 3, 4

  3. 2, 3, 5

  4. 1, 3, 4

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Statement 2 is illegal because multiple variables in one declaration require individual type declarations: V_123 VARCHAR2(10), V_213 VARCHAR2(10), V_132 VARCHAR2(10). Statement 3 is illegal because Boolean variables can only be assigned TRUE, FALSE, or NULL, not the numeric value 1. Statement 5 is illegal because NOT NULL must follow the datatype: V_Hiredate DATE NOT NULL. Statements 1 and 4 are legal.