Files
doc-exports/docs/dli/sqlreference/dli_08_0258.html
Su, Xiaomeng be9eabe464 dli_sqlreference_20250305
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2025-03-25 09:06:21 +00:00

2.7 KiB

Creating a Temporary Stream

Function

The temporary stream is used to simplify SQL logic. If complex SQL logic is followed, write SQL statements concatenated with temporary streams. The temporary stream is just a logical concept and does not generate any data.

Syntax

The syntax for creating a temporary stream is as follows:

1
CREATE TEMP STREAM stream_id (attr_name attr_type (',' attr_name attr_type)* )

Example

The following is an example of creating a temporary stream:

1
create temp stream a2(attr1 int, attr2 string);