Updated on 2025-07-22 GMT+08:00

GaussDB(DWS) SQL Syntax

To better understand how to use the syntax, you can refer to the following description of SQL syntax text conventions.

Table 1 SQL Syntax Description

Format

Description

Uppercase characters

Keywords must be in uppercase.

Lowercase characters

Parameters must be in lowercase.

[ ]

Optional syntax item. Items in brackets [] are optional.

{ }

Mandatory syntax item.

...

Preceding elements can appear repeatedly.

[ x | y | ... ]

One item is selected from two or more options or no item is selected.

{ x | y | ... }

One item is selected from two or more options.

[x | y | ... ] [ ... ]

You can choose either multiple parameters or no parameters. If you choose multiple parameters, simply separate them with spaces.

[ x | y | ... ] [ ,... ]

You can choose either multiple parameters or no parameters. If you choose multiple parameters, simply separate them with commas (,).

{ x | y | ... } [ ... ]

You must select at least one parameter. If you select multiple parameters, separate them with spaces.

{ x | y | ... } [ ,... ]

You must select at least one parameter. If you select multiple parameters, separate them with commas (,).