4.4.1 Inquiry

Organization of this subsection
(1) Format
(2) Function
(3) Operands
(4) Syntax rules
(5) Notes
(6) Usage example

(1) Format

inquiry::={relation-expression|stream-clause'('relation-expression')'}

(2) Function

Searches the data in a relation or the stream defined in the REGISTER STREAM clause.

(3) Operands

relation-expression

For details about specifying a relation expression, see 4.4.3 Relation expression.

If you specify a relation expression without specifying a stream clause, the result of the inquiry is acquired as a relation.

stream-clause

To specify a stream clause, enter a relation expression enclosed in parentheses (( )) following the stream clause. For details about specifying a stream clause, see 4.4.2 Stream clause.

When a stream clause is specified, the result of the inquiry is acquired as a stream.

(4) Syntax rules

None.

(5) Notes

None.

(6) Usage example

Specifies a relation expression that generates a relation from the data in column a of stream s1. The generated relation is output as the relation q1. The underlined part indicates the inquiry.

REGISTER QUERY q1 SELECT s1.a FROM s1[ROWS 10];