Skip to main content

Oracle Database Programming MCQs with Answers

Practice important Oracle Database Programming MCQs with answers and explanations.

Multiple Choice Questions

Q91: In PL/SQL, how is a unique sequence generated?
  • A: Using a SELECT statement
  • B: Using a COMMIT statement
  • C: Using a ROLLBACK statement
  • D: Using a sequence object
View Answer
D

Q92: What command is used to save a transaction in PL/SQL?
  • A: SAVEPOINT
  • B: ROLLBACK
  • C: COMMIT
  • D: SELECT
View Answer
C

Q93: In a PL/SQL block, which command is used to undo a transaction?
  • A: SAVEPOINT
  • B: ROLLBACK
  • C: COMMIT
  • D: INSERT
View Answer
B

Q94: What is the purpose of SAVEPOINT in a transaction?
  • A: To save the entire transaction
  • B: To roll back the entire transaction
  • C: To mark a point in the transaction to roll back to
  • D: To commit the transaction
View Answer
C

Q95: What will the output be if a ROLLBACK to SAVEPOINT A occurs after two rows were inserted in a table?
  • A: 2 rows inserted
  • B: 1 row inserted
  • C: 0 rows inserted
  • D: Error
View Answer
B

Q96: What does the IF-THEN statement in PL/SQL do?
  • A: Executes the statements if condition is TRUE
  • B: Executes statements if condition is FALSE
  • C: Loops through all conditions
  • D: Skips the statement
View Answer
A

Q97: In PL/SQL, which keyword is used to end an IF statement?
  • A: FINISH
  • B: END IF
  • C: TERMINATE
  • D: CLOSE
View Answer
B

Q98: What is the maximum number of employees allowed in any department according to the policy mentioned?
  • A: 50
  • B: 60
  • C: 40
  • D: 70
View Answer
A

Q99: In the provided PL/SQL block, which table is being checked for department #20 employee count?
  • A: sales
  • B: emp
  • C: accounts
  • D: hr
View Answer
B

Q100: Which of the following represents the output of the program where the total employees are less than or equal to 50?
  • A: "Table is empty"
  • B: "Table is not empty"
  • C: "Row inserted in Department 20"
  • D: "Row could not be inserted"
View Answer
B

Test Your Knowledge

Take a timed quiz on Oracle Database Programming

🚀 Start Quiz Now