Online Exam Quiz

questionQuestion  1 to 30

How can you call a function from a PL/SQL block?

  • function_name(params);
  • CALL function_name(params);
  • EXEC function_name(params);
  • BEGIN function_name(params);
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 %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

How can you pass parameters to PL/SQL procedures?

  • By Value
  • By Reference
  • Both
  • None
Mark for review

How do you declare a record type in PL/SQL?

  • TYPE record_name IS RECORD
  • RECORD record_name IS
  • DECLARE record_name RECORD
  • TYPE record_name RECORD IS
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 the purpose of a PL/SQL package?

  • To store procedures only
  • To store functions only
  • To group related procedures
  • To create database connections
Mark for review

Which operator is used to concatenate strings in PL/SQL?

  • +
  • &
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 keyword is used to declare a constant in PL/SQL?

  • CONSTANT
  • FIXED
  • STATIC
  • IMMUTABLE
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 can you create a PL/SQL subprogram?

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

What is the function of the INTO clause in a SELECT statement in PL/SQL?

  • To specify the table
  • To specify the columns
  • To specify the variables
  • To specify the conditions
Mark for review

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

  • RECORD
  • BOOLEAN
  • TABLE
  • CURSOR
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

How do you enable a previously disabled trigger in PL/SQL?

  • ENABLE TRIGGER trigger_name;
  • ALTER TRIGGER trigger_name ENABLE;
  • ENABLE trigger_name;
  • ALTER TRIGGER trigger_name ENABLED;
Mark for review

Which command is used to remove a package from the database?

  • DELETE PACKAGE
  • DROP PACKAGE
  • REMOVE PACKAGE
  • TRUNCATE PACKAGE
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

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

Which PL/SQL construct is used to iterate over a set of rows returned by a query?

  • FOR loop
  • CURSOR loop
  • WHILE loop
  • REPEAT loop
Mark for review

How do you terminate a PL/SQL block?

  • WITH;
  • ;
  • END;
  • /
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

Which of the following is a PL/SQL block?

  • Anonymous Block
  • Named Block
  • Both
  • None
Mark for review

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

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

What is the use of the FETCH statement in PL/SQL?

  • To retrieve the next row
  • To open a cursor
  • To close a cursor
  • To declare a cursor
Mark for review

How do you exit a loop prematurely in PL/SQL?

  • EXIT
  • LEAVE
  • BREAK
  • CONTINUE
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 PL/SQL cursor attribute?

  • %FOUND
  • %ROWCOUNT
  • %NOTFOUND
  • %EXISTS
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

What does the RAISE_APPLICATION_ERROR procedure do?

  • Stops the PL/SQL block
  • Returns a system error
  • Logs an error in the database
  • Raises a user-defined error
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