Which statement is true about the output of the PL/SQL block?

View the Exhibit to examine the PIVSQL block.

Which statement is true about the output of the PL/SQL block?

View the Exhibit to examine the PIVSQL block.

Which statement is true about the output of the PL/SQL block?

A.
It executes and the Output is emprec.deptname:.

B.
It executes and the Output is emprec.deptname:Sales.

C.
It produces an error because NULL is assigned to the emprec.empid field in the record.

D.
It produces an error because the CHECK constraint is violated while assigning a value to the
emprec.deptid field in the record.

Explanation:



Leave a Reply 7

Your email address will not be published. Required fields are marked *


samkelo siyabonga ngubo

samkelo siyabonga ngubo

A

Piero

Piero

http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/type_attribute.htm#LNPLS01352

The %TYPE attribute lets you declare a constant, variable, field,
or parameter to be of the same data type a previously declared variable,
field, record, nested table, or database column. If the referenced item changes,
your declaration is automatically updated.

An item declared with %TYPE (the referencing item)
always inherits the data type of the referenced item.
The referencing item inherits the constraints only if the referenced item is not a database column.
The referencing item inherits the default value only if the referencing item is not a database column
and does not have the NOT NULL constraint.

Elkhan

Elkhan

A, referencing item inherits the constraints only if the referenced item is not a database column