Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Somethoing about database 1. Which three statements about restrictions on packag

ID: 3726834 • Letter: S

Question

Somethoing about database

1. Which three statements about restrictions on package functions used in SQL are true? (Choose three.)

A function called from a DML statement can read or modify the particular table being modified by the DML statement.

A function called from a DML statement cannot read or modify the particular table being modified by the DML statement.

A function called from a query statement or from a parallelized DML statement can execute a DML statement or modify the database.

A function called from a query statement or from a parallelized DML statement cannot execute a DML statement or modify the database.

A function called from a query or DML statement can end the current transaction, create or roll back a savepoint, or alter the system or session.

A function called from a query or DML statement cannot end the current transaction, create or roll back a savepoint, or alter the system or session.

2.Examine this package:

CREATE OR REPLACE PACKAGE prod_pack

IS

CURSOR c1 is

SELECT *

FROM product;

PROCEDURE order_product

(p1 IN NUMBER, p2 IN NUMBER);

END prod_pack;

CREATE OR REPLACE PACKAGE BODY prod_pack

IS

CURSOR c2 IS

SELECT *

FROM ord;

PROCEDURE order_product

(p1 IN NUMBER, p2 IN NUMBER)

IS

BEGIN

OPEN c2;

...

END;

END prod_pack;

You execute these commands in SQL*Plus:

EXECUTE OPEN prod_pack.c1;

EXECUTE prod_pack.order_product(100,1);

Which cursor or cursors will be opened for the duration of the session, unless it is explicitly closed?

C1 only

C2 only

both C1 and C2

neither C1 nor C2

a.

A function called from a DML statement can read or modify the particular table being modified by the DML statement.

b.

A function called from a DML statement cannot read or modify the particular table being modified by the DML statement.

c.

A function called from a query statement or from a parallelized DML statement can execute a DML statement or modify the database.

d.

A function called from a query statement or from a parallelized DML statement cannot execute a DML statement or modify the database.

e.

A function called from a query or DML statement can end the current transaction, create or roll back a savepoint, or alter the system or session.

f.

A function called from a query or DML statement cannot end the current transaction, create or roll back a savepoint, or alter the system or session.

Explanation / Answer

1)

Answers are

B. A function called from a DML statement cannot read or modify the particular table beingmodified by the DML statement.

D. A function called from a query statement or from a parallelized DML statement cannotexecute a DML statement or modify the database

F. A function called from a query or DML statement cannot end the current transaction, create or roll back a savepoint, or alter the system or session.

2)

Both C1 and C2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote