Grammar Reference
This section describes grammar elements that are common to multiple SQL functions (DDL, Distribution Zones, etc.).
assign
Parameters
identifier- the name of table, column or other element that will be updated by the operation.expression- a valid SQL expression that returns the values that must be assigned to theidentifier.
Referenced by:
column_definition
Keywords and parameters:
-
column_name- a column name. -
DATA TYPE- the data type allowed in the column. -
identifier- the random identifier for the row. Can be generated by using the rand_uuid function. -
literal_value- a value to be assigned as default. -
CURRENT_TIMESTAMP- the function that returns current time. Can only be used forTIMESTAMP WITH LOCAL TIME ZONEcolumns. -
interval- the time interval by which the timestamp will be offset. Required ifCURRENT_TIMESTAMPis used. The interval can be specified in:SECONDSMINUTESHOURSDAYSMONTHS
If the interval is
0, current time is used.
Referenced by:
column_definition_or_list
Keywords and parameters:
column_name- a column name.data_type- a valid data type.
Referenced by:
column_list
Keywords and parameters:
column_name- a column name.
Referenced by:
column_name_or_list
Keywords and parameters:
column_name- a column name.
Referenced by:
constraint
Keywords and parameters:
constraint_name- a name of the constraint.
Referenced by:
group_item
Parameters
expression- a valid SQL expression that returns the values that must be assigned to theidentifier.
Referenced by:
join_condition
Parameters
boolean_expression- an SQL expression that returns a boolean value. Only the records for whichTRUEwas returned will be returned. If not specified, all matching records are returned.
Referenced by:
order_item
Parameters
expression- a valid SQL expression that denotes the specific item in the SELECT clause.
Referenced by:
parameter
Parameters:
parameter_name- the name of the parameter.parameter_value- the value of the parameter.
When a parameter is specified, you can provide it as a literal value or as an identifier. For example:
CREATE ZONE test_zone;
CREATE TABLE test_table (id INT PRIMARY KEY, val INT) WITH PRIMARY_ZONE=test_zone;
In this case, test_zone is the identifier, and is used as an identifier. When used like this, the parameters are not case-sensitive.
CREATE ZONE "test_zone";
CREATE TABLE test_table (id INT PRIMARY KEY, val INT) WITH PRIMARY_ZONE='test_zone';
In this case, test_zone is created as a literal value, and is used as a literal. When used like this, the parameter is case-sensitive.
CREATE ZONE test_zone;
CREATE TABLE test_table (id INT PRIMARY KEY, val INT) WITH PRIMARY_ZONE=`TEST_ZONE`;
In this case, test_zone is created as an identifier, and is case-insensitive. As such, when TEST_ZONE is used as a literal, it still matches the identifier.
Referenced by:
project_item
Parameters
expression- a valid SQL expression that denotes the specific item in the SELECT clause.table_alias- a qualified table alias to use.
Referenced by:
qualified_table_name
Keywords and parameters:
schema- a name of the table schema.table_name- a name of the table.
Referenced by:
query
Parameters
expression- a valid SQL expression.start- the number of result to start the query from.count- the number of values to fetch.
Referenced by:
select_without_from
Referenced by:
sorted_column_list
Keywords and parameters:
column_name- a column name.NULLS FIRST- if specified, places any NULL values before all non-NULL in that column's ordering.NULLS LAST- if specified, places NULLs after all non-NULLs in that column's ordering.
Referenced by:
table_expression
Parameters
Referenced by:
table_primary
Parameters
hint_comment- an sql optimizer hint.expression- a valid SQL expression.function_name- the name of the SQL function to use.
Referenced by:
table_reference
Parameters
alias- the alias that will be used for the table.column_alias- the alias used for column.
Referenced by:
with_item
Referenced by: