MCQS RDBMS
MCQS RDBMS
Unit 1
1. Words used in a PL/SQL block are called ______________.
a) Lexical Units
b) Literals
c) Constant
d) Variable
11. In which section of PL/SQL block of code memory variables and other
Oracle objects can be declared.
a) End
b) Begin
c) Declare
d) Exception
RDBMS MCQ FOR ALL UNITS
12. Which section of PL/SQL code block deals with handling of errors that arise
during execution of the data manipulation statements.
a) End
b) Begin
c) Declare
d) Exception
a) For Loop
b) Simple Loop
c) Single Loop
d) While Loop
a) For Loop
b) Simple Loop
c) Single Loop
d) While Loop
20. _______ is development tool that not only support SQL data manipulation
but also provides facilities of conditional checking, branching and looping.
a) PL/SQL
b) T-SQL
c) SQL*Plus
d) MySQL
RDBMS MCQ FOR ALL UNITS
Unit 2
1. Which of the following event starts a transaction?
a) A commit statement is issued
b) User disconnects with the database
c) The first SQL statement is performed after connecting to a database
d) A DDL statement such as, CREATE command is issued
2. Which of the following syntax is correct for creating a savepoint in
PL/SQL?
a) SAVEPOINT;
b) <savepoint_namecc;
c) <savepoint_name> SAVEPOINT;
d) SAVEPOINT <savepoint_name>
3. Which of the following implicit cursor returns the count of rows affected by
an INSERT, UPDATE or DELETE statement?
a) %FOUND
b) %NOTFOUND
c) %ISOPEN
d) %ROWCOUNT
4. Which of the following is the correct syntax to access a implicit SQL cursor
attribute?
a) select%attribute_name
b) oracle%attribute_name
c) sql%attribute_name
d) %attribute_name
5. Which of the following is the correct syntax for creating an explicit cursor?
a) cursor_name IS column_name;
b) CURSOR cursor_name IS SELECT_statement;
c) cursor_name CURSOR IS SELECT_statement;
d) CURSOR cursor_name IS column_name;
9. How many steps are associated when working with an explicit cursor?
a) 3
b) 4
c) 5
d) 6
11 A series of one or more SQL statement that are logically related, or a series
of operations we performed on oracle table data is termed as ______
a. Rollback
b. Commit
c. Oracle transaction
d. Concurrency control
12. A _______ends the current transaction and makes permanent any changes made
during the transaction.
A. COMMIT
B. ROLLBACK
C. SAVEPOINT
D. ROLLBACK TO SAVEPOINT
RDBMS MCQ FOR ALL UNITS
13 The data that is stored in the cursor is called the ____
A. database
B. table
c. Active dataset
d. none of above
15. The_______statement retrives the rows from the active set opened in the server.
a. fetch
b. open
c.close
d.declare
18. The technique of lock taken on a table or its resources by a user is called _________
a. implicit locking
b. explicit locking
c. shared locks
d. exclusive locks
19. _____ indicates that the oracle engine should immediate return to the user with a
message.
a. nowwait
b. for update
c. read operations
d. write operations
RDBMS MCQ FOR ALL UNITS
20. if the where clause evaluates to set of data, a ___level lock is used.
a. row
b. page
c. table
d. database
RDBMS MCQ FOR ALL UNITS
Unit 3
7. What is required when creating a function but not necessarily when creating a
procedure?
• A. IN parameters
• B. OUT parameters
• C. A RETURN data type
• D. An EXCEPTION block
12. How many values a function can return to the calling PL/SQL code block.
A. ONE
B. TWO
C. THREE
D. FOUR
16. Which exception is raised when an attempt is made to insert a duplicate value
into a column with a unique index?
• A. NO_DATA_FOUND
• B. LOGIN_DENIED
• C. DUP_VAL_ON_INDEX
• D. TIMEOUT_ON_RESOURCE
19. Which of the following exceptions is raised when a SELECT statement returns
zero rows?
• A. TOO_MANY_ROWS
• B. NO_DATA_FOUND
• C. LOGIN_DENIED
• D. DUP_VAL_ON_INDEX
20. How many parameters Exception_init() function will take?
• A. ONE
• B. TWO
• C. THREE
• D. FOUR
RDBMS MCQ FOR ALL UNITS
UNIT 4
1. Any subprogram not in the package specification but coded in the package body is
called a __________
a. Public object
b. Private object
c. Both A & B
d. None of the above
4. All objects placed within the package specification are known as which objects?
a) Private Objects
b) Protected Objects
c) Public Objects
d) Normal Objects
5. The public elements of a package can be accessed using which of the following
symbol?
a) *
b) =
c) .
d) ->
6. Which of the following syntax is the correct way to access a package element?
a) package.element_name;
b) element_name.package;
c) element_name.package_name;
d) package_name.element_name;
RDBMS MCQ FOR ALL UNITS
7. The __________ Statement is used for creating the package body.
a) CREATE
b) CREATE PACKAGE
c) CREATE BODY
d) CREATE PACKAGE BODY
10. Whenever a specified event occurs, the ____ is automatically triggered by the
Oracle engine.
a) Cursor
b) Trigger
c) Exception
d) View
A. This clause is used to refer the old values for different DML statements.
B. This clause is used to refer the new values for different DML statements.
C. Both A. and B.
D. None of the above
15 Which clause(s) is/are used to specify when the trigger will get executed?
A. BEFORE
B. AFTER
C. INSTEAD OF
D. All of the above
16 Triggers can be defined on the?
A. table
B. view
C. schema
D. All of the above
RDBMS MCQ FOR ALL UNITS
17. What is the range of Raise_application_error?
a) 20000 to 20009
b) -20000 to -20999
c) -20000 to 20999
d)None of the above.
20) The CREATE TRIGGER statement is used to create the trigger. THE _____ clause
specifies the table name on which the trigger is to be attached. The ______ specifies
that this is an AFTER-INSERT trigger.
a) for insert, on
b) On, for insert
c) For, insert
d) None of the mentioned