PL / SQL quiz

Last Updated :
Discuss
Comments

Question 1

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

  • A

    INTEGER var1;

  • B

    var1 int := 5;

  • C

    var1 INTEGER;

  • D

    DECLARE INTEGER var1 := 5;

Question 2

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

  • A

    VARCHAR2

  • B

    NUMBER

  • C

    REAL

  • D

    STRING

Question 3

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

  • A

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

  • B

    CREATE proc_name BEGIN ... END;

  • C

    PROCEDURE CREATE proc_name IS BEGIN ... END;

  • D

    PROCEDURE proc_name() BEGIN ... END;

Question 4

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

  • A

    They store compiled code

  • B

    They are used for user-defined functions

  • C

    They prompt the user for input

  • D

    They define exceptions

There are 4 questions to complete.

Take a part in the ongoing discussion