Consider The Plsql Code Below And Select The Appropriate #512
Consider the PL/SQL code below and select the appropriate output.</p> <pre><code class="language-sql">DECLARE n number(2) := 40; BEGIN IF( n = 10 ) THEN dbms_output.put_line('Value of n is 10 ' ); ELSE IF ( n = 20 ) THEN dbms_output.put_line('Value of n is 20' ); ELSE IF ( n = 30 ) THEN dbms_output.put_line('Value of n is 30' ); ELSE IF ( n = 40 ) THEN dbms_output.put_line('Value of n is 40' ); ELSE dbms.output.put_line(‘Value of n not known’); END IF; dbms_output.put_line('value of n is : ' || n); END; /</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs115 Structured Query Language.
It can also be found in
gs gs115 PL/SQL Constants and Operators - PL/SQL Conditions - Quiz No.1.
Consider the PL/SQL code below and select the appropriate output.
DECLARE n number(2) := 40; BEGIN IF( n = 10 ) THEN dbms_output.put_line('Value of n is 10 ' ); ELSE IF ( n = 20 ) THEN dbms_output.put_line('Value of n is 20' ); ELSE IF ( n = 30 ) THEN dbms_output.put_line('Value of n is 30' ); ELSE IF ( n = 40 ) THEN dbms_output.put_line('Value of n is 40' ); ELSE dbms.output.put_line(‘Value of n not known’); END IF; dbms_output.put_line('value of n is : ' || n); END; /
Value of n is 40 value of n is : 40 PL/SQL procedure successfully completed.Value of n not known value of n is : 40 PL/SQL procedure successfully completed.Value of n is 10 PL/SQL procedure successfully completed.Value of n is 40 value of n is : 40