PL/SQL Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to PL/SQL. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : D

Q 3 - What is the output of the following code?

DECLARE
   grade char(1) := 'B';
BEGIN
   case 
      when grade = 'A' then dbms_output.put_line('Excellent');
      when grade = 'B' then dbms_output.put_line('Very good');
      when grade = 'C' then dbms_output.put_line('Well done');
      when grade = 'D' then dbms_output.put_line('You passed');
      when grade = 'F' then dbms_output.put_line('Better try again');
      else dbms_output.put_line('No such grade');
   end case;
END;

A - It has syntax error, so there will not be any output.

B - B

C - Very good

D - No such grade

Answer : C

Q 5 - Which of the following is a way of passing parameters to PL/SQL subprograms?

A - Positional notation

B - Named notation

C - Mixed notation

D - All of the above.

Answer : D

Q 7 - Observe the syntax given below −

CREATE [OR REPLACE ] TRIGGER trigger_name 
{BEFORE | AFTER | INSTEAD OF } 
{INSERT [OR] | UPDATE [OR] | DELETE} 
[OF col_name] 
ON table_name 
[REFERENCING OLD AS o NEW AS n] 
[FOR EACH ROW] 
WHEN (condition)  
DECLARE
   Declaration-statements
BEGIN 
   Executable-statements
EXCEPTION
   Exception-handling-statements
END;

The {INSERT [OR] | UPDATE [OR] | DELETE} clause specifies a

A - DDL operation.

B - DML operation.

C - None of the above.

D - Both of the above.

Answer : B

Q 8 - All objects placed in a package specification are called

A - Public objects.

B - Private objects.

C - None of the above.

D - Both of the above.

Answer : A


plsql_questions_answers.htm

Advertisements