Multiple choice

Which line in the above code has an error?

 declare
            no number;
            sq number;
begin
            no:=&number; --Line 1
            if no>10000 then -- Line 2
                        dbms_output.put_line('Too large value'); -- Line 3
            else -- Line 4
                        sq=no*no; -- Line 5
                        dbms_output.put_line(\\\\\\'Square of \\\\\\' || no || \\\\\\' is \\\\\\' || sq); -- Line 6
            end if; -- Line 7
end;
/

  1. Line 1

  2. Line 2

  3. Line 5

  4. Line 6

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

The assignment operator in PL/SQL is := whereas the above code is using the '=' operator which is an equality operator. Therefore, this line will display an error.