Qualified Expression

Using qualified expressions, you can declare and define a complex value in a compact form where the value is needed.

Qualified expressions appear in:




Qualified expressions for RECORD types are allowed in any context where an expression of RECORD type is allowed.

Qualified expressions for associative array types are allowed in any context where an expression of associative array type is allowed.

typemark ( aggregate )

Specifies explicitly the type of the aggregate (qualified items).



Qualified expressions use an explicit type indication to provide the type of the qualified item. This explicit indication is known as a typemark.

[identifier . ]identifier

Indicates the type of the qualified item.


A qualified expression combines expression elements to create values of a RECORD type, or associative array type.


expr [ , ]

Positional association is allowed for qualified expressions of RECORD type.

A positional association may not follow a named association in the same construct (and vice versa).


FOR iterator SEQUENCE => expr

The sequence iterator choice association is a positional argument and may be intermixed freely with other positional arguments. All positional arguments must precede any non-positional arguments. Sequence iteration is not allowed for INDEX BY VARCHAR2 arrays.


named_choice_list | indexed_choice_list | basic_iterator_choice | index_iterator_choice

Named choices must use names of fields from the qualifying structure type. Index key values must be compatible with the index type for the qualifying vector type.


A named choice applies only to structured types

identifier => expr [ , ]

Named association is allowed for qualified expressions of RECORD type.


An index choice applies only to vector types.

expr => expr [ , ]

Indexed choices (key-value pairs) is allowed for qualified expressions of associative array types. Both the key and the value may be expressions.

Using NULL as an index key value is not permitted with associative array type constructs.


FOR iterator => expr

The basic iterator choice association uses the iterand as an index.


The PAIRS OF iteration control may not be used with the basic iterator choice association.


FOR iterator INDEX expr => expr

The index iterator choice association provides an index expression along with the value expression.


You can use the OTHERS selector in aggregates for record types and aggregates for varrays. The OTHERS choice must be your final choice.