Skip to content

SQL quick reference

CREATE STREAM

Create a new HStreamDB stream with stream name given. An exception will be thrown if the stream is already created. See CREATE STREAM.

CREATE STREAM stream_name [AS select_query] ;

SELECT

Continuously get records from the stream(s) specified as streaming data flows in. It is usually used in an interactive CLI to monitor realtime changes of data. Note that the query writes these records to a random-named stream. See SELECT (Stream).

SELECT <* | expression [ AS field_alias ] [, ...]>
  FROM stream_name_1
       [ join_type JOIN stream_name_2
         WITHIN (some_interval)
         ON stream_name_1.field_1 = stream_name_2.field_2 ]
  [ WHERE search_condition ]
  [ GROUP BY field_name [, window_type] ]
  EMIT CHANGES;

INSERT

Insert a record into the specified stream. See INSERT.

INSERT INTO stream_name (field_name [, ...]) VALUES (field_value [, ...]);

DROP STREAM

Delete a specified stream with the given stream name.

DROP STREAM stream_name ;

SHOW

Show the infomation of given category.

SHOW STREAM

Show all stream names of streams in HStreamDB

SHOW STREAM

SHOW QUERIES

Show information of all queries ever created.

SHOW Queries