Online Exam Quiz

questionQuestion  1 to 30

How can you handle exceptions in PL/SQL?

  • Using TRY-CATCH block
  • Using BEGIN-END block
  • Using EXCEPTION block
  • Using RAISE block
Mark for review

What is the default value of a boolean variable in PL/SQL?

  • TRUE
  • FALSE
  • NULL
  • 0
Mark for review

How do you open an explicit cursor in PL/SQL?

  • OPEN cursor_name;
  • cursor_name OPEN;
  • cursor_name OPEN;
  • OPEN cursor_name; BEGIN
Mark for review

What is the function of the COMMIT statement in PL/SQL?

  • To save changes permanently
  • To undo changes
  • To begin a transaction
  • To end a transaction
Mark for review

Which PL/SQL construct is used for handling exceptions?

  • RAISE
  • EXCEPTION
  • DECLARE
  • BEGIN
Mark for review

Which of the following is not a valid way to comment in PL/SQL?

  • -- comment
  • /* comment */
  • /** comment **/
  • REM comment
Mark for review

How do you declare a cursor in PL/SQL?

  • DECLARE cursor CURSOR
  • CURSOR cursor IS
  • OPEN cursor
  • CREATE cursor
Mark for review

What is the maximum number of triggers that can be applied to a table in Oracle?

  • 12
  • 16
  • 20
  • No limit
Mark for review

Which of the following is true about PL/SQL procedures and functions?

  • Procedures cannot return values
  • Functions cannot have parameters
  • Functions must return a value
  • Procedures and functions are the same
Mark for review

Which data type is used to store large binary objects in PL/SQL?

  • BLOB
  • CLOB
  • BFILE
  • LOB
Mark for review

What is the default mode for parameters in PL/SQL procedures?

  • IN
  • OUT
  • IN OUT
  • DEFAULT
Mark for review

How do you declare a variable in PL/SQL?

  • var_name variable_type;
  • variable_type var_name;
  • var_name: variable_type;
  • var_name:= variable_type;
Mark for review

Which clause is used to handle multiple exceptions in PL/SQL?

  • WHEN OTHERS
  • WHEN
  • EXCEPTION
  • RAISE
Mark for review

Which of the following is not a valid PL/SQL control structure?

  • IF-THEN
  • FOR-LOOP
  • WHILE-LOOP
  • DO-UNTIL-LOOP
Mark for review

How can you create a PL/SQL subprogram?

  • Using CREATE PROCEDURE
  • Using CREATE FUNCTION
  • Using CREATE PACKAGE
  • All of the above
Mark for review

Which PL/SQL keyword is used to raise an exception explicitly?

  • THROW
  • RAISE
  • EXCEPTION
  • SIGNAL
Mark for review

What is the scope of a variable declared in a PL/SQL block?

  • Global
  • Local
  • Package-level
  • Schema-level
Mark for review

Which of the following is a valid PL/SQL identifier?

  • 123var
  • var_123
  • var-123
  • var$123
Mark for review

Which of the following is not a PL/SQL cursor attribute?

  • %FOUND
  • %ROWCOUNT
  • %NOTFOUND
  • %EXISTS
Mark for review

What is a pragma in PL/SQL?

  • A compiler directive
  • A data type
  • A loop control
  • An exception handler
Mark for review

Which of the following is a scalar data type in PL/SQL?

  • RECORD
  • BOOLEAN
  • TABLE
  • CURSOR
Mark for review

What is the difference between %ROWTYPE and %TYPE attributes in PL/SQL?

  • %ROWTYPE is for rows, %TYPE is for columns
  • %ROWTYPE is for columns, %TYPE is for rows
  • %ROWTYPE is for tables, %TYPE is for records
  • %ROWTYPE is for records, %TYPE is for variables
Mark for review

How do you declare a constant in PL/SQL?

  • CONSTANT var_name TYPE := value;
  • var_name CONSTANT TYPE := value;
  • var_name TYPE CONSTANT := value;
  • var_name TYPE := CONSTANT value;
Mark for review

Which of the following is a composite data type in PL/SQL?

  • NUMBER
  • BOOLEAN
  • RECORD
  • CHAR
Mark for review

Which PL/SQL feature is used to repeat a statement or group of statements multiple times?

  • IF-THEN
  • LOOP
  • EXCEPTION
  • DECLARE
Mark for review

Which of the following is not a valid PL/SQL loop?

  • FOR loop
  • WHILE loop
  • DO-WHILE loop
  • LOOP loop
Mark for review

What is the purpose of a sequence in PL/SQL?

  • To generate unique numbers
  • To define data types
  • To create tables
  • To create indexes
Mark for review

How do you handle null values in PL/SQL?

  • Using IS NULL
  • Using = NULL
  • Using NULL
  • Using NULLIF
Mark for review

What is the purpose of the %TYPE attribute in PL/SQL?

  • To declare a column type
  • To declare a row type
  • To declare a variable type
  • To declare a table type
Mark for review

What is %ROWTYPE used for in PL/SQL?

  • To declare a table row
  • To declare a table column
  • To declare a record variable
  • To declare a constant variable
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review