🌙 DARK

Most Asked DCA Oracle PL SQL MCQ questions and answers - Page 2

 Page 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣

Q 1. What is a cursor in PL/SQL?

A) A database object used to store query results

B) A temporary work area used to store a set of rows from a SQL statement

C) A PL/SQL program that accepts input parameters and returns a single value

D) A database trigger that fires when a specified event occurs

Answer: B

 

Q 2. What is a trigger in PL/SQL?

A) A database object used to store query results

B) A temporary work area used to store a set of rows from a SQL statement

C) A PL/SQL program that accepts input parameters and returns a single value

D) A trigger is a stored PL/SQL program unit associated with a specific database table, view, schema, or the database.

Answer: D

 

Q 3. What is a function in PL/SQL?

A) A database object used to store query results

B) A temporary work area used to store a set of rows from a SQL statement

C) A PL/SQL program that accepts input parameters and returns a single value

D) A database object that fires in response to a specific event or change in the database

Answer: C

 

Q 4. What is the purpose of a join in PL/SQL?

A) To combine data from two or more tables based on a related column between them

B) To create a temporary work area used to store a set of rows from a SQL statement

C) To execute a PL/SQL program that accepts input parameters and returns a single value

D) To create a database trigger that fires when a specified event occurs

Answer: A

 

Q 5. What is the difference between a BEFORE and AFTER trigger in PL/SQL?

A) A BEFORE trigger fires before the specified event occurs, while an AFTER trigger fires after the event occurs

B) A BEFORE trigger fires after the specified event occurs, while an AFTER trigger fires before the event occurs

C) There is no difference between a BEFORE and AFTER trigger in PL/SQL

D) A BEFORE trigger can be created on both DDL and DML statements, while an AFTER trigger can only be created on DML statements

Answer: A

 

Q 6. What is a cursor FOR loop in PL/SQL used for?

A) To execute a single SQL statement

B) To execute a PL/SQL program that accepts input parameters and returns a single value

C) To iterate through a set of rows returned by a SELECT statement

D) To create a temporary work area used to store a set of rows from a SQL statement

Answer: C

 

Q 7. What is a bulk collect in PL/SQL?

A) A feature used to execute a single SQL statement

B) A feature used to iterate through a set of rows returned by a SELECT statement

C) A feature used to retrieve multiple rows at once from a cursor or query

D) A feature used to create a temporary work area used to store a set of rows from a SQL statement

Answer: C

 

Q 8. What is a correlated subquery in PL/SQL?

A) A subquery that can reference a column from a table in the outer query

B) A subquery that cannot reference any columns from the outer query

C) A subquery that can only be used with the EXISTS operator

D) A subquery that can only be used with the IN operator

Answer: A

 

Q 9. What is a cursor in PL/SQL?

a) A database object used to manipulate data

b) A control structure used to iterate over a set of rows returned by a SELECT statement

c) A function used to perform calculations on a set of data

d) A trigger used to enforce constraints on data

Answer: b

 

Q 10. Which of the following is not a type of cursor in PL/SQL?

a) Implicit cursor

b) Explicit cursor

c) Dynamic cursor

d) Static cursor

Answer: c

 

Q 11. Which keyword is used to define a trigger in PL/SQL?

a) BEGIN

b) TRIGGER

c) DECLARE

d) PROCEDURE

Answer: b) 

 

Q 12. What is a PL/SQL function?

a) A database object used to manipulate data

b) A control structure used to iterate over a set of rows returned by a SELECT statement

c) A trigger used to enforce constraints on data

d) A program unit that performs a specific task and returns a value

Answer: d)

 

Q 13. Which of the following is not a type of join in PL/SQL?

a) INNER JOIN

b) OUTER JOIN

c) CROSS JOIN

d) UNION JOIN

Answer: d) 

 

Q 14. Which of the following is not a type of cursor in PL/SQL?

A. Implicit cursor

B. Explicit cursor

C. Dynamic cursor

D. Static cursor

Answer: C

 

Q 15. What is the difference between an implicit cursor and an explicit cursor in PL/SQL?

A. An implicit cursor is created automatically by the database when a SQL statement is executed, while an explicit cursor is defined by the programmer.

B. An implicit cursor is used to retrieve a single row from a table, while an explicit cursor is used to retrieve multiple rows.

C. An implicit cursor is used for DML statements, while an explicit cursor is used for SELECT statements.

D. An implicit cursor is closed automatically by the database when the SQL statement completes, while an explicit cursor must be closed by the programmer.

Answer: A

 

Q 16. What is a function in PL/SQL?

A. A function is a named private SQL area that stores information about processing a specific SELECT or DML statement.

B. A function is a type of trigger that executes when a specific event occurs.

C. A function is a reserved word that defines a specific type of variable in PL/SQL.

D. A function is a stored PL/SQL program unit that returns a single value.

Answer: D

 

Q 17. What is a join in PL/SQL?

A. A join is a type of function that returns a set of rows.

B. A join is a reserved word that defines a specific type of variable in PL/SQL.

C. A join is a method of combining rows from two or more tables based on a related column between them.

D. A join is a named private SQL area that stores information about processing a specific SELECT or DML statement.

Answer: C

 

Q 18. Which of the following is not a type of trigger in PL/SQL?

A. DML trigger

B. Instead of trigger

C. Before trigger

D. Parallel trigger

Answer: D

 

Q 19. What is a mutating table error in PL/SQL?

A. A mutating table error occurs when a trigger tries to modify a table that is currently being modified by another transaction.

B. A mutating table error occurs when a function returns a value that is not compatible with the calling program.

C. A mutating table error occurs when a cursor is used to retrieve data from a table that has been modified by another transaction.

D. A mutating table error occurs when a join operation returns too many rows.

Answer: A

 

 

 

Page 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣


4 Comments

Thanks for reading the blog. We hope it was useful to you and that you learned something new. Will always be writing on new and interesting topics, so you can visit our website to know the latest updates of our blogs. Thank You!

  1. Anonymous10:10

    Thankyou

    ReplyDelete
  2. Kajal12:59

    Thanks For Q&A

    ReplyDelete
  3. Akash13:00

    Pls upload More questions and answers. Thanks :)

    ReplyDelete
  4. Anonymous13:54

    Thanks Bro

    ReplyDelete
Previous Post Next Post

Contact Form