Documentation

Home > Documentation > Syntax Conventions and Grammar

Syntax Conventions and Grammar

StreamSQL syntax descriptions use the following typographical conventions:

StreamSQL keywords
Shown in UPPERCASE, MONOSPACE font. Although StreamSQL is case insensitive with respect to keywords, for clarity, use uppercase characters.

Example: CREATE TABLE

Substitutable entries
Shown in lower case, monospace, italic font. 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}

Square braces in quotes ( '[' and ']' )
In some statements, square braces are a required part of the StreamSQL syntax. In this case, each brace is shown within single quotation marks. In StreamSQL applications, the 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.

Related Topics