Skip to main content

Oracle Database Programming MCQs with Answers

Practice important Oracle Database Programming MCQs with answers and explanations.

Chapter: 4
Q61:
Which section in a PL/SQL block is mandatory?
A. DECLARE
B. BEGIN
C. EXCEPTION
D. END
Correct Answer: B
Chapter: 4
Q62:
The application tier in Oracle 11i manages communication between which tiers?
A. Client Tier and Database Tier
B. Web Tier and Database Tier
C. Middle Tier and Client Tier
D. Middleware Tier and Web Tier
Correct Answer: A
Chapter: 4
Q63:
Which tier is responsible for storing Oracle Applications online help?
A. Client Tier
B. Application Tier
C. Database Tier
D. Middle Tier
Correct Answer: C
Chapter: 4
Q64:
PL/SQL programs are compiled by the __________.
A. Oracle Database server
B. Application Server
C. Web Server
D. Client-side programs
Correct Answer: A
Chapter: 4
Q65:
PL/SQL is designed to embrace which type of statements within its syntax?
A. C++ statements
B. SQL statements
C. Web-based statements
D. Java-based statements
Correct Answer: B
Chapter: 4
Q66:
What does the DBMS_OUTPUT.PUT_LINE statement do in PL/SQL?
A. Writes to a file
B. Reads from the database
C. Displays output
D. Deletes a record
Correct Answer: C
Chapter: 4
Q67:
In the thick database paradigm, SQL statements are issued by ________.
A. PL/SQL subprograms inside the database
B. Web server subprograms
C. Client-side subprograms
D. Java applets
Correct Answer: A
Chapter: 4
Q68:
PL/SQL is used for both __________ development.
A. Database and Web
B. Server-side and Client-side
C. Client-side and Application-side
D. Server-side and Database-side
Correct Answer: B
Chapter: 4
Q69:
The minimum executable unit in PL/SQL is the __________.
A. Procedure
B. Trigger
C. Function
D. Block
Correct Answer: D
Chapter: 5
Q70:
In PL/SQL, which section allows variable declarations?
A. EXECUTION section
B. DECLARE section
C. EXCEPTION section
D. END section
Correct Answer: B
Chapter: 5
Q71:
Which of the following is a valid PL/SQL variable declaration?
A. a number(5) := 10;
B. name varchar2(30) := ‘abc’;
C. dob date := sysdate;
D. PI CONSTANT NUMBER := 3.1415;
Correct Answer: D
Chapter: 5
Q72:
How is output displayed in PL/SQL?
A. print_output
B. console_write
C. dbms_output.put_line
D. system_display
Correct Answer: C
Chapter: 5
Q73:
In the code f := 70.0 / 3.0;, what is the value of f?
A. 23
B. 21.3
C. 25.3
D. 23.333333333333
Correct Answer: D
Chapter: 5
Q74:
What happens if a variable is declared in both the outer and inner blocks in PL/SQL?
A. Inner block variable is ignored
B. Outer block variable is overridden
C. Both values are displayed
D. Error occurs
Correct Answer: B
Chapter: 5
Q75:
Which of the following is an example of a global variable in PL/SQL nested blocks?
A. num1 declared in outer block
B. num2 declared in outer block
C. num3 declared in outer block
D. num1 declared in inner block
Correct Answer: A
Chapter: 5
Q76:
What is the value of num2 in the inner block in the code below?
A. 85
B. 195
C. 95
D. 100
Correct Answer: B
Chapter: 5
Q77:
In the nested block example, why is the value of num1 the same in both the inner and outer blocks?
A. num1 is declared in the inner block
B. num1 is declared only in the outer block
C. num1 is a constant
D. num1 is passed as a parameter
Correct Answer: B
Chapter: 5
Q78:
In the PL/SQL block structure, which part is optional?
A. DECLARE part
B. BEGIN part
C. END part
D. EXECUTION part
Correct Answer: A
Chapter: 5
Q79:
What is the data type of Cost in the following declaration: Cost real := 390;?
A. real
B. integer
C. number
D. date
Correct Answer: A
Chapter: 5
Q80:
Which of the following data types can handle floating-point values in PL/SQL?
A. integer
B. varchar2
C. real
D. number
Correct Answer: C

Test Your Knowledge

Take a timed quiz on Oracle Database Programming

🚀 Start Quiz Now