Which line in the above declaration would generate an error?

Examine the following DECLARE section of PL/SQL block:


Which line in the above declaration would generate an error?
A. Line 2
B. Line 3
C. Line 4
D. Line 5
E. Line 6

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “Which line in the above declaration would generate an error?

  1. Correct Answer: A
    Like said below: varchar2 should have a size parameter which is missing in the above statement.

    DECLARE
    v_job_type varchar2:=’TEMP’;
    v_startdate date:=sysdate;
    v_enddate date:=v_startdate+10;
    c_tax_rate constant number(2):=8.25;
    v_valid boolean not null default true;
    begin
    null;
    end;
    /

    ERROR at line 2:
    ORA-06550: line 2, column 12:
    PLS-00215: String length constraints must be in range (1 .. 32767)

  2. You are right, because the varchar2 should have a size parameter which is missing in the above statement.

  3. declare
    v_test constant number(2) := 8.25;
    begin
    dbms_output.put_line(v_test);
    end;

    OUTPUT:
    8

  4. I think letter ‘A’ is the incorrect, because this block generates error:

    declare
    v_test varchar2 := ‘TEMP’;
    begin
    null;
    end;

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.