PL / SQL quiz

Last Updated :
Discuss
Comments

Question 1

Which of the following correctly declares a variable in PL/SQL?

  • INTEGER var1;

  • var1 int := 5;

  • var1 INTEGER;

  • DECLARE INTEGER var1 := 5;

Question 2

Which of the following data types is NOT valid in PL/SQL?

  • VARCHAR2

  • NUMBER

  • REAL

  • STRING

Question 3

Which of the following is a correct syntax to create a procedure in PL/SQL?

  • CREATE PROCEDURE proc_name() IS BEGIN ... END;

  • CREATE proc_name BEGIN ... END;

  • PROCEDURE CREATE proc_name IS BEGIN ... END;

  • PROCEDURE proc_name() BEGIN ... END;

Question 4

What is the role of substitution variables (e.g., &a) in PL/SQL?

  • They store compiled code

  • They are used for user-defined functions

  • They prompt the user for input

  • They define exceptions

There are 4 questions to complete.

Take a part in the ongoing discussion