Oracle Database Programming MCQs with Answers
Practice important Oracle Database Programming MCQs with answers and explanations.
Multiple Choice Questions
Q121: Which job type receives a salary raise of 0.09 in the provided PL/SQL block?
- A: MANAGER
- B: ANALYST
- C: CLERK
- D: DBA
View Answer
C
Q122: In the PL/SQL block, what happens if the job ID does not match CLERK, MANAGER, or ANALYST?
- A: Raise by 0.09
- B: Raise by 0.07
- C: No raise
- D: Raise by 0.08
View Answer
C
Q123: What discount is given if the order amount is between 20000 and 30000?
- A: 0.05
- B: 0.08
- C: 0.1
- D: No discount
View Answer
B
Q124: In the CASE statement, how is flexibility achieved in a searched CASE expression?
- A: By using more operators
- B: By reducing comparisons
- C: By removing ELSE condition
- D: By writing complete conditions in each comparison
View Answer
D
Q125: In the first PL/SQL block for the user scenario, what message is printed if the user is 'APEX_PUBLIC_USER'?
- A: Test User
- B: Admin User
- C: Owner of Schema
- D: Invalid User
View Answer
A
Q126: The syntax of the CASE statement includes which keyword?
- A: SELECT
- B: INSERT
- C: THEN
- D: DELETE
View Answer
C
Q127: What happens if ELSE part is not provided in a CASE statement and no condition is true?
- A: Execution continues
- B: An exception is raised
- C: Program halts
- D: Control goes to the next statement
View Answer
B
Q128: What is the purpose of a simple loop in PL/SQL?
- A: To execute statements only once
- B: To repeatedly execute a set of statements
- C: To terminate a loop before it starts
- D: To skip execution based on condition
View Answer
B
Q129: Which statement is true about a simple loop without an exit condition?
- A: It runs once and terminates
- B: It's an invalid syntax
- C: It runs indefinitely
- D: It terminates on its own
View Answer
C
Q130: In a simple loop, when does the loop terminate?
- A: When exit condition is TRUE
- B: When exit condition is FALSE
- C: After one iteration
- D: When the program ends
View Answer
A