StreamBase Documentation
StreamSQL Guide
Syntax Conventions and Grammar
Syntax descriptions in this guide use the following typographical conventions:
- StreamSQL keywords
- Shown in
UPPERCASE, MONOSPACEfont. Although StreamSQL is case insensitive with respect to keywords, for clarity, use uppercase characters.Example:
CREATE TABLE - Substitutable entries
- Shown in
lower case, monospace, italicfont. In StreamSQL applications, replace these placeholders with content suitable to the application; any combination of upper and lower case characters is acceptable.Example:
CREATE INDEX index_identifier ON table_identifier - Square braces ( [ and ] )
- Indicate optional content. If an optional entry is used, do not include the square braces in the StreamSQL application.
Example:
SELECT ... FROM ... [WHERE ...] - The pipe symbol ( | )
- Indicates a choice. In StreamSQL applications choose one of the alternatives separated by the symbol.
Example:
CREATE [MEMORY | DISK] TABLE table_identifier - Parentheses
- When present, are a required part of the StreamSQL syntax and must be entered as illustrated.
Example:
PRIMARY KEY(column_identifier[,...]) - Curly braces ( { and } )
- Indicate that a choice must be made from multiple alternatives. In StreamSQL applications, do not include the curly braces.
Example:
USING {HASH | BTREE} - Parentheses or square braces in quotes ('(' and ')', '[' and ']' )
- In some statements, parentheses or square braces are a required part of the StreamSQL syntax. In this case, each parenthesis or brace is
shown within single quotation marks. In StreamSQL applications, the parentheses or square braces must be included.
Example:
FROM stream_identifier '['window_specification']' - Square braces containing an ellipsis ( [, ...] )
- Indicate optional repeated content. If optional additional entries are used, do not include the square braces in the StreamSQL application.
Example:
SELECT field_identifier[, ...]Is equivalent to:
SELECT field_identifier_1, field_identifier_2, ..., where...indicates additional optional entries. - Double dashes ( –– )
- Indicates a comment. In StreamSQL, comments extend to the end of the line.
Example:
–– This comment extends to the end of the line.
Topics
- General Information
- Using StreamSQL
- Using the SBAPP-to-SSQL Conversion Assistant
- Using the StreamSQL Editor (related topic in the Authoring Guide)
- Data Definition Language
- Data Manipulation Language
