SQL for Oracle NoSQL Database Sequences

Sequence Concatenation Function

A sequence is an important concept in SQL for Oracle NoSQL Database. It is used wherever expressions and operators are discussed.

A sequence is the result of any expression that returns zero or more items. Sequences are not containers; they cannot be nested.

Note that an array is not a sequence; rather it is a single item that contains other items in it.

Sequences have a type. A sequence type specifies the type of items that may appear in a sequence. For example, a sequence could contain atomic elements that are of type integer. In this case, the sequence type would be integer.

Sequence types have a cardinality. The cardinality indicates constraints on how many items can or must appear in the sequence:

When we say that the result of an expression must have a sequence of a certain type, what we mean is the sequence must have that type or any subtype of that type.

Sequence subtypes are defined as follows:

The following table shows the subtype relationship for the various quantifiers:

Sequence Concatenation Function

Use the any* seq_concat(<argument>*) to concatenate one sequence to another sequence. This function evaluates its arguments (if any) in the order they are listed in the arguments list, and concatenates the sequences returned by these arguments.

For an example of using this function, see Adding Elements to an Array.