Oracle Database Programming MCQs with Answers
Practice important Oracle Database Programming MCQs with answers and explanations.
Multiple Choice Questions
Q101: In a PL/SQL block, how is the salary updated if more than 5 employees have worked for over 5 years?
- A: By 15%
- B: By 5%
- C: By 10%
- D: No update
View Answer
C
Q102: What variable is used to store the count of employees working for more than 5 years in the given solution?
- A: total_emp
- B: total
- C: max_id
- D: count
View Answer
A
Q103: Which PL/SQL user is being checked for in the IF-THEN-ELSE statement example?
- A: HR_PUBLIC_USER
- B: APEX_PUBLIC_USER
- C: SYSTEM_USER
- D: ANALYST_USER
View Answer
B
Q104: What is the maximum salary allowed for the designation 'ANALYST' in the given solution?
- A: 4000
- B: 4500
- C: 5000
- D: 5500
View Answer
C
Q105: What message is displayed when salary is between 3000 and 6000, and designation is 'MANAGER'?
- A: Not part of management
- B: Executive management
- C: Senior management
- D: Junior management
View Answer
C
Q106: What day is considered the 'start of the week' in the PL/SQL date block?
- A: Wednesday
- B: Saturday
- C: Monday
- D: Thursday
View Answer
C
Q107: In the nested IF statement, what happens if the parent IF condition is TRUE?
- A: Child IF will also be evaluated
- B: Program ends
- C: Parent IF executes but not child
- D: No output
View Answer
A
Q108: What is the output if both a is between 0 and 100 and b is between 101 and 200?
- A: Value of a is 100, Value of b is 200
- B: No output
- C: Invalid values
- D: Only a is true
View Answer
A
Q109: In the IF-THEN-ELSIF example, what message is displayed for salary between 6000 and 9000 with the designation 'PRESIDENT'?
- A: Senior Management
- B: Executive Management
- C: Not eligible
- D: No output
View Answer
B
Q110: Write a PL/SQL block to check if the number of employees is odd or even.
- A: Employees are odd
- B: Employees are even
- C: .
- D: .
View Answer
B