... |
||Keyword||Usage|| |
|{anchor:token_ADD}_ADD_|[add set option|#addSetOption]|| |
|{anchor:token_ALL}_ALL_|[standard aggregate function|#aggregateSymbol], [function|#function], [query expression body|#queryExpressionBody], [query term|#queryTerm] [select clause|#select], [quantified comparison predicate|#subqueryCompareCriteria]|| |
|{anchor:token_ALTER}_ALTER_|[alter|#alter]|| |{anchor:token_ALTER}_ALTER_|[alter|#alter], [alter column options|#alterColumn], [alter options|#alterStatement]|| |
|{anchor:token_AND}_AND_|[between predicate|#betweenCrit], [boolean term|#compoundCritAnd]|| |{anchor:token_ANY}_ANY_|[standard aggregate function|#aggregateSymbol], [quantified comparison predicate|#subqueryCompareCriteria]|| |
... |
|{anchor:token_CHAR}_CHAR_|[function|#function], [data type|#parseDataType]|| |{anchor:token_CLOB}_CLOB_|[data type|#parseDataType], [xml serialize|#xmlSerialize]|| |
|{anchor:token_COLUMN}_COLUMN_|[alter column options|#alterColumn]|| |
|{anchor:token_CONSTRAINT}_CONSTRAINT_|[create table body|#createTableBody]|| |
|{anchor:token_CONTINUE}_CONTINUE_|[branching statement|#branchingStatement]|| |{anchor:token_CONVERT}_CONVERT_|[function|#function]|| |
|{anchor:token_CREATE}_CREATE_|[create procedure|#createDDLProcedure], [create table|#createTable], [create temporary table|#createTempTable], [create trigger|#createTrigger] |
|{anchor:token_CREATE}_CREATE_|[create procedure|#createDDLProcedure], [create foreign temp table|#createForeignTempTable], [create table|#createTable], [create temporary table|#createTempTable] |
[create trigger|#createTrigger], [procedure body definition|#procedureBodyCommand]|| |
|{anchor:token_CROSS}_CROSS_|[cross join|#crossJoin]|| |{anchor:token_DATE}_DATE_|[data type|#parseDataType]|| |
... |
[select clause|#select]|| |{anchor:token_DOUBLE}_DOUBLE_|[data type|#parseDataType]|| |
|{anchor:token_DROP}_DROP_|[drop option|#dropOption], [drop table|#dropTable]|| |
|{anchor:token_EACH}_EACH_|[for each row trigger action|#forEachRowTriggerAction]|| |{anchor:token_ELSE}_ELSE_|[case expression|#caseExpression], [if statement|#ifStatement], [searched case expression|#searchedCaseExpression]|| |
... |
|{anchor:token_FLOAT}_FLOAT_|[data type|#parseDataType]|| |{anchor:token_FOR}_FOR_|[for each row trigger action|#forEachRowTriggerAction], [function|#function], [text aggreate function|#textAgg], [xml table column|#xmlColumn]|| |
|{anchor:token_FOREIGN}_FOREIGN_|[create procedure|#createDDLProcedure], [create table|#createTable], [foreign key|#foreignKey]|| |
|{anchor:token_FOREIGN}_FOREIGN_|[alter options|#alterStatement], [create procedure|#createDDLProcedure], [create foreign temp table|#createForeignTempTable], [create table|#createTable] [foreign key|#foreignKey]|| |
|{anchor:token_FROM}_FROM_|[delete statement|#delete], [from clause|#from], [function|#function]|| |{anchor:token_FULL}_FULL_|[qualified table|#qualifiedJoin]|| |
... |
|{anchor:token_MAKEDEP}_MAKEDEP_|[option clause|#option], [table primary|#tablePrimary]|| |{anchor:token_MAKENOTDEP}_MAKENOTDEP_|[option clause|#option], [table primary|#tablePrimary]|| |
|{anchor:token_MERGE}_MERGE_|[insert statement|#insert]|| |
|{anchor:token_MINUTE}_MINUTE_|[function|#function]|| |{anchor:token_MONTH}_MONTH_|[function|#function]|| |
... |
|{anchor:token_OF}_OF_|[alter|#alter], [create trigger|#createTrigger]|| |{anchor:token_OFFSET}_OFFSET_|[limit clause|#limit]|| |
|{anchor:token_ON}_ON_|[alter|#alter], [create foreign temp table|#createForeignTempTable], [create trigger|#createTrigger], [loop statement|#loopStatement], [qualified table|#qualifiedJoin] |
[qualified table|#qualifiedJoin], [xml query|#xmlQuery]|| |
|{anchor:token_ONLY}_ONLY_|[fetch clause|#fetchLimit]|| |{anchor:token_OPTION}_OPTION_|[option clause|#option]|| |
|{anchor:token_OPTIONS}_OPTIONS_|[alter options list|#alterOptionsList], [options clause|#optionsClause]|| |
|{anchor:token_OR}_OR_|[boolean value expression|#compoundCritOr]|| |{anchor:token_ORDER}_ORDER_|[order by clause|#orderby]|| |
... |
|{anchor:token_OUTER}_OUTER_|[qualified table|#qualifiedJoin]|| |{anchor:token_OVER}_OVER_|[window specification|#windowSpecification]|| |
|{anchor:token_PARAMETER}_PARAMETER_|[alter column options|#alterColumn]|| |
|{anchor:token_PARTITION}_PARTITION_|[window specification|#windowSpecification]|| |{anchor:token_PRIMARY}_PRIMARY_|[table element|#createColumn], [create temporary table|#createTempTable], [primary key|#primaryKey]|| |
|{anchor:token_PROCEDURE}_PROCEDURE_|[alter|#alter], [alter options|#alterStatement], [create procedure|#createDDLProcedure], [procedure body definition|#procedureBodyCommand]|| |
|{anchor:token_REAL}_REAL_|[data type|#parseDataType]|| |{anchor:token_REFERENCES}_REFERENCES_|[foreign key|#foreignKey]|| |
... |
|{anchor:token_SECOND}_SECOND_|[function|#function]|| |{anchor:token_SELECT}_SELECT_|[select clause|#select]|| |
|{anchor:token_SET}_SET_|[add set option|#addSetOption], [option namespace|#createNameSpace], [update statement|#update]|| |
|{anchor:token_SHORT}_SHORT_|[data type|#parseDataType]|| |{anchor:token_SIMILAR}_SIMILAR_|[match predicate|#matchCrit]|| |
... |
|{anchor:token_SQLWARNING}_SQLWARNING_|[raise statement|#raiseStatement]|| |{anchor:token_STRING}_STRING_|[dynamic data statement|#dynamicCommand], [data type|#parseDataType], [xml serialize|#xmlSerialize]|| |
|{anchor:token_TABLE}_TABLE_|[create procedure|#createDDLProcedure], [create table|#createTable], [create temporary table|#createTempTable], [drop table|#dropTable] |
|{anchor:token_TABLE}_TABLE_|[alter options|#alterStatement], [create procedure|#createDDLProcedure], [create foreign temp table|#createForeignTempTable], [create table|#createTable] |
[create temporary table|#createTempTable], [drop table|#dropTable], [query primary|#queryPrimary], [table subquery|#subqueryFromClause]|| |
|{anchor:token_TEMPORARY}_TEMPORARY_|[create foreign temp table|#createForeignTempTable], [create temporary table|#createTempTable]|| |
|{anchor:token_THEN}_THEN_|[case expression|#caseExpression], [searched case expression|#searchedCaseExpression]|| |{anchor:token_TIME}_TIME_|[data type|#parseDataType]|| |
... |
|{anchor:token_VARBINARY}_VARBINARY_|[data type|#parseDataType], [xml serialize|#xmlSerialize]|| |{anchor:token_VARCHAR}_VARCHAR_|[data type|#parseDataType], [xml serialize|#xmlSerialize]|| |
|{anchor:token_VIRTUAL}_VIRTUAL_|[alter options|#alterStatement], [create procedure|#createDDLProcedure], [create table|#createTable], [procedure body definition|#procedureBodyCommand]|| |
|{anchor:token_WHEN}_WHEN_|[case expression|#caseExpression], [searched case expression|#searchedCaseExpression]|| |{anchor:token_WHERE}_WHERE_|[filter clause|#filterClause], [where clause|#where]|| |
... |
|{anchor:token_INDEX}_INDEX_|[other constraints|#constraint], [table element|#createColumn], [non-reserved identifier|#nonReserved]|| |{anchor:token_INSTEAD}_INSTEAD_|[alter|#alter], [create trigger|#createTrigger], [non-reserved identifier|#nonReserved]|| |
|{anchor:token_JSONARRAY_AGG}_JSONARRAY_AGG_|[non-reserved identifier|#nonReserved], [ordered aggreate function|#orderedAgg]|| |{anchor:token_JSONOBJECT}_JSONOBJECT_|[json object|#jsonObject], [non-reserved identifier|#nonReserved]|| |
|{anchor:token_KEY}_KEY_|[table element|#createColumn], [create temporary table|#createTempTable], [foreign key|#foreignKey], [non-reserved identifier|#nonReserved] [primary key|#primaryKey]|| |
... |
|{anchor:token_VAR_SAMP}_VAR_SAMP_|[standard aggregate function|#aggregateSymbol], [non-reserved identifier|#nonReserved]|| |{anchor:token_VERSION}_VERSION_|[non-reserved identifier|#nonReserved], [xml serialize|#xmlSerialize]|| |
|{anchor:token_VIEW}_VIEW_|[alter|#alter], [alter options|#alterStatement], [create table|#createTable], [non-reserved identifier|#nonReserved]|| |
|{anchor:token_WELLFORMED}_WELLFORMED_|[non-reserved identifier|#nonReserved], [xml parse|#xmlParse]|| |{anchor:token_WIDTH}_WIDTH_|[non-reserved identifier|#nonReserved], [text table column|#textColumn]|| |{anchor:token_XMLDECLARATION}_XMLDECLARATION_|[non-reserved identifier|#nonReserved], [xml serialize|#xmlSerialize]|| h2. {anchor:header_rkf}Reserved Keywords For Future Use |
|ADD|ALLOCATE|ARE|ARRAY|ASENSITIVE|ASYMETRIC|AUTHORIZATION|BINARY|| |ALLOCATE|ARE|ARRAY|ASENSITIVE|ASYMETRIC|AUTHORIZATION|BINARY|CALLED|| |
|CALLED|CASCADED|CHARACTER|CHECK|CLOSE|COLLATE|COLUMN|COMMIT|| |
|CASCADED|CHARACTER|CHECK|CLOSE|COLLATE|COMMIT|CONNECT|CORRESPONDING|| |
|CONNECT|CORRESPONDING|CRITERIA|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|| |CRITERIA|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|CYCLE|DATALINK|| |
|CYCLE|DATALINK|DEALLOCATE|DEC|DEREF|DESCRIBE|DETERMINISTIC|DISCONNECT|| |DEALLOCATE|DEC|DEREF|DESCRIBE|DETERMINISTIC|DISCONNECT|DLNEWCOPY|DLPREVIOUSCOPY|| |
|DLNEWCOPY|DLPREVIOUSCOPY|DLURLCOMPLETE|DLURLCOMPLETEONLY|DLURLCOMPLETEWRITE|DLURLPATH|DLURLPATHONLY|DLURLPATHWRITE|| |DLURLCOMPLETE|DLURLCOMPLETEONLY|DLURLCOMPLETEWRITE|DLURLPATH|DLURLPATHONLY|DLURLPATHWRITE|DLURLSCHEME|DLURLSERVER|| |
|DLURLSCHEME|DLURLSERVER|DLVALUE|DYNAMIC|ELEMENT|EXTERNAL|FREE|GET|| |DLVALUE|DYNAMIC|ELEMENT|EXTERNAL|FREE|GET|GLOBAL|GRANT|| |
|GLOBAL|GRANT|HAS|HOLD|IDENTITY|IMPORT|INDICATOR|INPUT|| |HAS|HOLD|IDENTITY|IMPORT|INDICATOR|INPUT|INSENSITIVE|INT|| |
|INSENSITIVE|INT|INTERVAL|ISOLATION|LARGE|LOCALTIME|LOCALTIMESTAMP|MATCH|| |INTERVAL|ISOLATION|LARGE|LOCALTIME|LOCALTIMESTAMP|MATCH|MEMBER|METHOD|| |
|MEMBER|MERGE|METHOD|MODIFIES|MODULE|MULTISET|NATIONAL|NATURAL|| |NCHAR|NCLOB|NEW|NONE|NUMERIC|OLD|OPEN|OUTPUT|| |OVERLAPS|PARAMETER|PRECISION|PREPARE|RANGE|READS|RECURSIVE|REFERENCING|| |RELEASE|REVOKE|ROLLBACK|ROLLUP|SAVEPOINT|SCROLL|SEARCH|SENSITIVE|| |SESSION_USER|SPECIFIC|SPECIFICTYPE|SQL|START|STATIC|SUBMULTILIST|SYMETRIC|| |SYSTEM|SYSTEM_USER|TIMEZONE_HOUR|TIMEZONE_MINUTE|TRANSLATION|TREAT|VALUE|VARYING|| |WHENEVER|WINDOW|WITHIN|XMLBINARY|XMLCAST|XMLDOCUMENT|XMLEXISTS|XMLITERATE|| |
|MODIFIES|MODULE|MULTISET|NATIONAL|NATURAL|NCHAR|NCLOB|NEW|| |NONE|NUMERIC|OLD|OPEN|OUTPUT|OVERLAPS|PRECISION|PREPARE|| |RANGE|READS|RECURSIVE|REFERENCING|RELEASE|REVOKE|ROLLBACK|ROLLUP|| |SAVEPOINT|SCROLL|SEARCH|SENSITIVE|SESSION_USER|SPECIFIC|SPECIFICTYPE|SQL|| |START|STATIC|SUBMULTILIST|SYMETRIC|SYSTEM|SYSTEM_USER|TIMEZONE_HOUR|TIMEZONE_MINUTE|| |TRANSLATION|TREAT|VALUE|VARYING|WHENEVER|WINDOW|WITHIN|XMLBINARY|| |
|XMLTEXT|XMLVALIDATE|| |XMLCAST|XMLDOCUMENT|XMLEXISTS|XMLITERATE|XMLTEXT|XMLVALIDATE|| |
h2. {anchor:header_t}Tokens |
... |
|{anchor:token_BINARYSTRINGVAL}_binary string literal_|"X" \| "x" "\'" (<[hexit|#token_HEXIT]> <[hexit|#token_HEXIT]>)+ "\'"|[non numeric literal|#nonNumericLiteral]|| |{anchor:token_COLON}_colon_|":"|[statement|#statement]|| |
|{anchor:token_COMMA}_comma_|","|[alter options list|#alterOptionsList], [column list|#columnList], [create procedure|#createDDLProcedure], [typed element list|#createElementsWithTypes], [create table|#createTable] |
[create temporary table|#createTempTable], [sql exception|#exception], [named parameter list|#executeNamedParams], [expression list|#expressionList] [from clause|#from], [function|#function], [limit clause|#limit], [object table|#objectTable] [option clause|#option], [options clause|#optionsClause], [order by clause|#orderby], [data type|#parseDataType] [query expression|#queryExpression], [querystring function|#queryString], [select clause|#select], [set clause list|#setClauseList] [in predicate|#setCrit], [text aggreate function|#textAgg], [text table|#textTable], [xml attributes|#xmlAttributes] [xml element|#xmlElement], [xml forest|#xmlForest], [xml namespaces|#xmlNamespaces], [xml query|#xmlQuery] |
[create table body|#createTableBody], [create temporary table|#createTempTable], [derived column list|#derivedColumnList], [sql exception|#exception] [named parameter list|#executeNamedParams], [expression list|#expressionList], [from clause|#from], [function|#function] [limit clause|#limit], [object table|#objectTable], [option clause|#option], [options clause|#optionsClause] [order by clause|#orderby], [data type|#parseDataType], [query expression|#queryExpression], [querystring function|#queryString] [select clause|#select], [set clause list|#setClauseList], [in predicate|#setCrit], [text aggreate function|#textAgg] [text table|#textTable], [xml attributes|#xmlAttributes], [xml element|#xmlElement], [xml forest|#xmlForest] |
[xml namespaces|#xmlNamespaces], [xml query|#xmlQuery], [xml table|#xmlTable]|| |
|{anchor:token_CONCAT_OP}_concat_op_|"\|\|"|[common value expression|#commonValueExpression]|| |{anchor:token_DECIMALVAL}_decimal numeric literal_|(<[digit|#token_DIGIT]>)* <[period|#token_PERIOD]> <[unsigned integer literal|#token_UNSIGNEDINTEGER]>|[unsigned numeric literal|#unsignedNumericLiteral]|| |
... |
|{anchor:token_LE}_le_|"<="|[comparison operator|#operator]|| |{anchor:token_LETTER}_letter_|\["a"\-"z","A"\-"Z"\] \| \["\u0153"\-"\ufffd"\]||| |
|{anchor:token_LPAREN}_lparen_|"("|[standard aggregate function|#aggregateSymbol], [alter options list|#alterOptionsList], [analytic aggregate function|#analyticAggregateSymbol], [array table|#arrayTable], [callable statement|#callableStatement] |
[callable statement|#callableStatement], [column list|#columnList], [other constraints|#constraint], [create procedure|#createDDLProcedure], [create table|#createTable] |
[create table body|#createTableBody], [create temporary table|#createTempTable], [filter clause|#filterClause], [function|#function], [if statement|#ifStatement] |
[insert statement|#insert], [loop statement|#loopStatement], [object table|#objectTable], [options clause|#optionsClause] [ordered aggreate function|#orderedAgg], [data type|#parseDataType], [query primary|#queryPrimary], [querystring function|#queryString] [in predicate|#setCrit], [call statement|#storedProcedure], [subquery|#subquery], [table subquery|#subqueryFromClause] [table primary|#tablePrimary], [text aggreate function|#textAgg], [text table|#textTable], [unsigned value expression primary|#unsignedValueExpressionPrimary] [while statement|#whileStatement], [window specification|#windowSpecification], [with list element|#withListElement], [xml attributes|#xmlAttributes] [xml element|#xmlElement], [xml forest|#xmlForest], [xml namespaces|#xmlNamespaces], [xml parse|#xmlParse] [xml query|#xmlQuery], [xml serialize|#xmlSerialize], [xml table|#xmlTable]|| |
[if statement|#ifStatement], [insert statement|#insert], [json object|#jsonObject], [loop statement|#loopStatement] [object table|#objectTable], [options clause|#optionsClause], [ordered aggreate function|#orderedAgg], [data type|#parseDataType] [query primary|#queryPrimary], [querystring function|#queryString], [in predicate|#setCrit], [call statement|#storedProcedure] [subquery|#subquery], [table subquery|#subqueryFromClause], [table primary|#tablePrimary], [text aggreate function|#textAgg] [text table|#textTable], [unsigned value expression primary|#unsignedValueExpressionPrimary], [while statement|#whileStatement], [window specification|#windowSpecification] [with list element|#withListElement], [xml attributes|#xmlAttributes], [xml element|#xmlElement], [xml forest|#xmlForest] [xml namespaces|#xmlNamespaces], [xml parse|#xmlParse], [xml query|#xmlQuery], [xml serialize|#xmlSerialize] [xml table|#xmlTable]|| |
|{anchor:token_LSBRACE}_lsbrace_|"\["|[unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:token_LT}_lt_|"<"|[comparison operator|#operator]|| |
... |
|{anchor:token_RBRACE}_rbrace_|"\}"|[callable statement|#callableStatement], [match predicate|#matchCrit], [non numeric literal|#nonNumericLiteral], [table reference|#tableReference] [unsigned value expression primary|#unsignedValueExpressionPrimary]|| |
|{anchor:token_RPAREN}_rparen_|")"|[standard aggregate function|#aggregateSymbol], [alter options list|#alterOptionsList], [analytic aggregate function|#analyticAggregateSymbol], [array table|#arrayTable], [callable statement|#callableStatement] |
[callable statement|#callableStatement], [column list|#columnList], [other constraints|#constraint], [create procedure|#createDDLProcedure], [create table|#createTable] |
[create table body|#createTableBody], [create temporary table|#createTempTable], [filter clause|#filterClause], [function|#function], [if statement|#ifStatement] |
[insert statement|#insert], [loop statement|#loopStatement], [object table|#objectTable], [options clause|#optionsClause] [ordered aggreate function|#orderedAgg], [data type|#parseDataType], [query primary|#queryPrimary], [querystring function|#queryString] [in predicate|#setCrit], [call statement|#storedProcedure], [subquery|#subquery], [table subquery|#subqueryFromClause] [table primary|#tablePrimary], [text aggreate function|#textAgg], [text table|#textTable], [unsigned value expression primary|#unsignedValueExpressionPrimary] [while statement|#whileStatement], [window specification|#windowSpecification], [with list element|#withListElement], [xml attributes|#xmlAttributes] [xml element|#xmlElement], [xml forest|#xmlForest], [xml namespaces|#xmlNamespaces], [xml parse|#xmlParse] [xml query|#xmlQuery], [xml serialize|#xmlSerialize], [xml table|#xmlTable]|| |
[if statement|#ifStatement], [insert statement|#insert], [json object|#jsonObject], [loop statement|#loopStatement] [object table|#objectTable], [options clause|#optionsClause], [ordered aggreate function|#orderedAgg], [data type|#parseDataType] [query primary|#queryPrimary], [querystring function|#queryString], [in predicate|#setCrit], [call statement|#storedProcedure] [subquery|#subquery], [table subquery|#subqueryFromClause], [table primary|#tablePrimary], [text aggreate function|#textAgg] [text table|#textTable], [unsigned value expression primary|#unsignedValueExpressionPrimary], [while statement|#whileStatement], [window specification|#windowSpecification] [with list element|#withListElement], [xml attributes|#xmlAttributes], [xml element|#xmlElement], [xml forest|#xmlForest] [xml namespaces|#xmlNamespaces], [xml parse|#xmlParse], [xml query|#xmlQuery], [xml serialize|#xmlSerialize] [xml table|#xmlTable]|| |
|{anchor:token_RSBRACE}_rsbrace_|"\]"|[unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:token_SEMICOLON}_semicolon_|";"|[ddl statement|#ddlStmt], [delimited statement|#delimitedStatement]|| |
... |
||Name||Usage|| |
|{anchor:usage_addSetOption}_[add set option|#addSetOption]_|[alter options list|#alterOptionsList]|| |
|{anchor:usage_aggregateSymbol}_[standard aggregate function|#aggregateSymbol]_|[unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:usage_allInGroupSymbol}_[all in group |#allInGroupSymbol]_|[select sublist|#selectSymbol]|| |{anchor:usage_alter}_[alter|#alter]_|[directly executable statement|#userCommand]|| |
|{anchor:usage_alterColumn}_[alter column options|#alterColumn]_|[alter options|#alterStatement]|| |{anchor:usage_alterOptionsList}_[alter options list|#alterOptionsList]_|[alter column options|#alterColumn], [alter options|#alterStatement]|| |{anchor:usage_alterStatement}_[alter options|#alterStatement]_|[ddl statement|#ddlStmt]|| |
|{anchor:usage_analyticAggregateSymbol}_[analytic aggregate function|#analyticAggregateSymbol]_|[unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:usage_arrayTable}_[array table|#arrayTable]_|[table primary|#tablePrimary]|| |
... |
|{anchor:usage_compoundCritOr}_[boolean value expression|#compoundCritOr]_|[condition|#criteria]|| |{anchor:usage_compoundStatement}_[compound statement|#compoundStatement]_|[statement|#statement]|| |
|{anchor:usage_constraint}_[other constraints|#constraint]_|[create table body|#createTableBody]|| |
|{anchor:usage_createColumn}_[table element|#createColumn]_|[create table body|#createTableBody]|| |
|{anchor:usage_createDDLProcedure}_[create procedure|#createDDLProcedure]_|[ddl statement|#ddlStmt]|| |{anchor:usage_createElementsWithTypes}_[typed element list|#createElementsWithTypes]_|[array table|#arrayTable], [dynamic data statement|#dynamicCommand]|| |
|{anchor:usage_createForeignTempTable}_[create foreign temp table|#createForeignTempTable]_|[directly executable statement|#userCommand]|| |
|{anchor:usage_createNameSpace}_[option namespace|#createNameSpace]_|[ddl statement|#ddlStmt]|| |{anchor:usage_createTable}_[create table|#createTable]_|[ddl statement|#ddlStmt]|| |
|{anchor:usage_createTableBody}_[create table body|#createTableBody]_|[create foreign temp table|#createForeignTempTable], [create table|#createTable]|| |
|{anchor:usage_createTempTable}_[create temporary table|#createTempTable]_|[directly executable statement|#userCommand]|| |{anchor:usage_createTrigger}_[create trigger|#createTrigger]_|[ddl statement|#ddlStmt], [directly executable statement|#userCommand]|| |
... |
|{anchor:usage_delete}_[delete statement|#delete]_|[assignment statement operand|#assignStatementOperand], [directly executable statement|#userCommand]|| |{anchor:usage_delimitedStatement}_[delimited statement|#delimitedStatement]_|[statement|#statement]|| |
|{anchor:usage_derivedColumn}_[derived column|#derivedColumn]_|[derived column list|#derivedColumnList], [object table|#objectTable], [querystring function|#queryString], [text aggreate function|#textAgg], [xml attributes|#xmlAttributes] |
[xml forest|#xmlForest], attributes|#xmlAttributes], [xml query|#xmlQuery], [xml table|#xmlTable]|| |
|{anchor:usage_derivedColumnList}_[derived column list|#derivedColumnList]_|[json object|#jsonObject], [xml forest|#xmlForest]|| |{anchor:usage_dropOption}_[drop option|#dropOption]_|[alter options list|#alterOptionsList]|| |
|{anchor:usage_dropTable}_[drop table|#dropTable]_|[directly executable statement|#userCommand]|| |{anchor:usage_dynamicCommand}_[dynamic data statement|#dynamicCommand]_|[data statement|#sqlStatement]|| |
... |
|{anchor:usage_filterClause}_[filter clause|#filterClause]_|[function|#function], [unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:usage_forEachRowTriggerAction}_[for each row trigger action|#forEachRowTriggerAction]_|[alter|#alter], [create trigger|#createTrigger]|| |
|{anchor:usage_foreignKey}_[foreign key|#foreignKey]_|[create table body|#createTableBody]|| |
|{anchor:usage_from}_[from clause|#from]_|[query|#query]|| |{anchor:usage_function}_[function|#function]_|[unsigned value expression primary|#unsignedValueExpressionPrimary]|| |{anchor:usage_groupBy}_[group by clause|#groupBy]_|[query|#query]|| |{anchor:usage_having}_[having clause|#having]_|[query|#query]|| |
|{anchor:usage_id}_[identifier|#id]_|[alter|#alter], [array table|#arrayTable], [assignment statement|#assignStatement], [branching statement|#branchingStatement] [callable statement|#callableStatement], [column list|#columnList], [compound statement|#compoundStatement], [table element|#createColumn] [create procedure|#createDDLProcedure], [typed element list|#createElementsWithTypes], [option namespace|#createNameSpace], [create table|#createTable] |
|{anchor:usage_id}_[identifier|#id]_|[alter|#alter], [alter column options|#alterColumn], [alter options|#alterStatement], [array table|#arrayTable] [assignment statement|#assignStatement], [branching statement|#branchingStatement], [callable statement|#callableStatement], [column list|#columnList] [compound statement|#compoundStatement], [table element|#createColumn], [create procedure|#createDDLProcedure], [typed element list|#createElementsWithTypes] [create foreign temp table|#createForeignTempTable], [option namespace|#createNameSpace], [create table|#createTable], [create table body|#createTableBody] |
[create temporary table|#createTempTable], [create trigger|#createTrigger], [declare statement|#declareStatement], [delete statement|#delete] |
[derived column|#derivedColumn], [drop option|#dropOption], [drop table|#dropTable], [dynamic data statement|#dynamicCommand], [exception reference|#exceptionReference] |
[exception reference|#exceptionReference], [named parameter list|#executeNamedParams], [foreign key|#foreignKey], [function|#function], [insert statement|#insert] |
[insert statement|#insert], [into clause|#into], [loop statement|#loopStatement], [xml namespace element|#namespaceItem], [object table column|#objectColumn] |
[object table column|#objectColumn], [object table|#objectTable], [option clause|#option], [option pair|#optionPair], [procedure parameter|#procedureParameter] |
[procedure parameter|#procedureParameter], [procedure result column|#procedureRsColumn], [query primary|#queryPrimary], [select derived column|#selectExpression], [set clause list|#setClauseList] |
[statement|#statement], [call statement|#storedProcedure], [table subquery|#subqueryFromClause], [temporary table element|#tableElement] |
[set clause list|#setClauseList], [statement|#statement], [call statement|#storedProcedure], [table subquery|#subqueryFromClause] |
[temporary table element|#tableElement], [text aggreate function|#textAgg], [text table column|#textColumn], [text table|#textTable], [table name|#unaryFromClause] |
[table name|#unaryFromClause], [update statement|#update], [with list element|#withListElement], [xml table column|#xmlColumn], [xml element|#xmlElement] |
[xml element|#xmlElement], [xml serialize|#xmlSerialize], [xml table|#xmlTable]|| |
|{anchor:usage_ifStatement}_[if statement|#ifStatement]_|[statement|#statement]|| |{anchor:usage_insert}_[insert statement|#insert]_|[assignment statement operand|#assignStatementOperand], [directly executable statement|#userCommand]|| |
... |
|{anchor:usage_isNullCrit}_[is null predicate|#isNullCrit]_|[boolean primary|#booleanPrimary]|| |{anchor:usage_joinedTable}_[joined table|#joinedTable]_|[table primary|#tablePrimary], [table reference|#tableReference]|| |
|{anchor:usage_jsonObject}_[json object|#jsonObject]_|[function|#function]|| |
|{anchor:usage_limit}_[limit clause|#limit]_|[query expression body|#queryExpressionBody]|| |{anchor:usage_loopStatement}_[loop statement|#loopStatement]_|[statement|#statement]|| |
... |
|{anchor:usage_option}_[option clause|#option]_|[callable statement|#callableStatement], [delete statement|#delete], [insert statement|#insert], [query expression body|#queryExpressionBody] [call statement|#storedProcedure], [update statement|#update]|| |
|{anchor:usage_optionPair}_[option pair|#optionPair]_|[add set option|#addSetOption], [options clause|#optionsClause]|| |
|{anchor:usage_optionsClause}_[options clause|#optionsClause]_|[table element|#createColumn], [create procedure|#createDDLProcedure], [create table body|#createTableBody], [procedure parameter|#procedureParameter] |
[procedure result column|#procedureRsColumn]|| |{anchor:usage_orderby}_[order by clause|#orderby]_|[function|#function], [ordered aggreate function|#orderedAgg], [query expression body|#queryExpressionBody], [text aggreate function|#textAgg] |
... |
|{anchor:usage_plusExpression}_[numeric value expression|#plusExpression]_|[common value expression|#commonValueExpression]|| |{anchor:usage_plusMinus}_[plus or minus|#plusMinus]_|[option pair|#optionPair], [numeric value expression|#plusExpression], [value expression primary|#valueExpressionPrimary]|| |
|{anchor:usage_primaryKey}_[primary key|#primaryKey]_|[create table body|#createTableBody]|| |
|{anchor:usage_procedureParameter}_[procedure parameter|#procedureParameter]_|[create procedure|#createDDLProcedure]|| |{anchor:usage_procedureRsColumn}_[procedure result column|#procedureRsColumn]_|[create procedure|#createDDLProcedure]|| |
... |
- |[EXCEPTION|#token_EXCEPTION]|| - |[CHAIN|#token_CHAIN]|| |
- |[JSONARRAY_AGG|#token_JSONARRAY_AGG]|| - |[JSONOBJECT|#token_JSONOBJECT]|| |
Allows non-reserved keywords to be parsed as identifiers |
... |
- |<[drop table|#dropTable]>|| - |<[create temporary table|#createTempTable]>|| |
- |<[create foreign temp table|#createForeignTempTable]>|| |
- |<[alter|#alter]>|| - |<[create trigger|#createTrigger]>|| |
... |
h3. {anchor:insert}_[insert statement|#usage_insert]_ ::= |
- |( [INSERT|#token_INSERT] \| [MERGE|#token_MERGE] ) [INTO|#token_INTO] <[identifier|#id]> ( <[column list|#columnList]> )? ( ( [VALUES|#token_VALUES] <[lparen|#token_LPAREN]> <[expression list|#expressionList]> <[rparen|#token_RPAREN]> ) \| <[query expression|#queryExpression]> ) ( <[option clause|#option]> )?|| |
Inserts values into the given target. |
... |
h3. {anchor:orderedAgg}_[ordered aggreate function|#usage_orderedAgg]_ ::= |
- |( [XMLAGG|#token_XMLAGG] \| [ARRAY_AGG|#token_ARRAY_AGG] \| [JSONARRAY_AGG|#token_JSONARRAY_AGG] ) <[lparen|#token_LPAREN]> <[expression|#expression]> ( <[order by clause|#orderby]> )? <[rparen|#token_RPAREN]>|| |
An aggregate function that can optionally be ordered. |
... |
Example: |
{code:sql}x = 'a'{code} |
{code:sql}= 'a'{code} |
|
... |
- |( [XMLPI|#token_XMLPI] <[lparen|#token_LPAREN]> ( ( [NAME|#token_NAME] )? <[identifier|#id]> ) ( <[comma|#token_COMMA]> <[expression|#expression]> )? <[rparen|#token_RPAREN]> )|| - |<[xml forest|#xmlForest]>|| |
- |<[json object|#jsonObject]>|| |
- |<[xml serialize|#xmlSerialize]>|| - |<[xml query|#xmlQuery]>|| |
... |
---- |
h3. {anchor:jsonObject}_[json object|#usage_jsonObject]_ ::= - |[JSONOBJECT|#token_JSONOBJECT] <[lparen|#token_LPAREN]> <[derived column list|#derivedColumnList]> <[rparen|#token_RPAREN]>|| Produces a JSON object containing name value pairs. Example: {code:sql}JSONOBJECT(col1 AS val1, col2 AS val2){code} ---- h3. {anchor:derivedColumnList}_[derived column list|#usage_derivedColumnList]_ ::= - |<[derived column|#derivedColumn]> ( <[comma|#token_COMMA]> <[derived column|#derivedColumn]> )\*|| a list of name value pairs Example: {code:sql}col1 AS val1, col2 AS val2{code} ---- |
h3. {anchor:xmlForest}_[xml forest|#usage_xmlForest]_ ::= |
- |[XMLFOREST|#token_XMLFOREST] <[lparen|#token_LPAREN]> ( <[xml namespaces|#xmlNamespaces]> <[comma|#token_COMMA]> )? <[derived column|#derivedColumn]> ( <[comma|#token_COMMA]> <[derived column|#derivedColumn]> )\* <[rparen|#token_RPAREN]>|| |
- |[XMLFOREST|#token_XMLFOREST] <[lparen|#token_LPAREN]> ( <[xml namespaces|#xmlNamespaces]> <[comma|#token_COMMA]> )? <[derived column list|#derivedColumnList]> <[rparen|#token_RPAREN]>|| |
Produces an element for each derived column. |
... |
h3. {anchor:ddlStmt}_[ddl statement|#usage_ddlStmt]_ ::= |
- |( <[create table|#createTable]> \| <[create procedure|#createDDLProcedure]> \| <[option namespace|#createNameSpace]> \| <[alter options|#alterStatement]> \| <[create trigger|#createTrigger]> ) ( <[semicolon|#token_SEMICOLON]> )?|| |
A data definition statement. |
... |
h3. {anchor:createTable}_[create table|#usage_createTable]_ ::= |
- |[CREATE|#token_CREATE] ( [FOREIGN|#token_FOREIGN] [TABLE|#token_TABLE] \| ( [VIRTUAL|#token_VIRTUAL] )? [VIEW|#token_VIEW] ) <[identifier|#id]> ( <[lparen|#token_LPAREN]> <[table element|#createColumn]> ( <[comma|#token_COMMA]> <[table element|#createColumn]> )\* ( <[comma|#token_COMMA]> ( [CONSTRAINT|#token_CONSTRAINT] <[identifier|#id]> )? ( <[primary key|#primaryKey]> \| <[other constraints|#constraint]> \| <[foreign key|#foreignKey]> ) ( <[options clause|#optionsClause]> )? )\* <[rparen|#token_RPAREN]> )? ( <[options clause|#optionsClause]> )? ( [AS|#token_AS] <[query expression|#queryExpression]> )?|| |
- |[CREATE|#token_CREATE] ( [FOREIGN|#token_FOREIGN] [TABLE|#token_TABLE] \| ( [VIRTUAL|#token_VIRTUAL] )? [VIEW|#token_VIEW] ) <[identifier|#id]> <[create table body|#createTableBody]> ( [AS|#token_AS] <[query expression|#queryExpression]> )?|| |
Defines a table or view. |
... |
---- |
h3. {anchor:createForeignTempTable}_[create foreign temp table|#usage_createForeignTempTable]_ ::= - |[CREATE|#token_CREATE] [FOREIGN|#token_FOREIGN] [TEMPORARY|#token_TEMPORARY] [TABLE|#token_TABLE] <[identifier|#id]> <[create table body|#createTableBody]> [ON|#token_ON] <[identifier|#id]>|| Defines a foreign temp table Example: {code:sql}CREATE FOREIGN TEMPORARY TABLE t (x string) ON z{code} ---- h3. {anchor:createTableBody}_[create table body|#usage_createTableBody]_ ::= - |( <[lparen|#token_LPAREN]> <[table element|#createColumn]> ( <[comma|#token_COMMA]> <[table element|#createColumn]> )\* ( <[comma|#token_COMMA]> ( [CONSTRAINT|#token_CONSTRAINT] <[identifier|#id]> )? ( <[primary key|#primaryKey]> \| <[other constraints|#constraint]> \| <[foreign key|#foreignKey]> ) ( <[options clause|#optionsClause]> )? )\* <[rparen|#token_RPAREN]> )? ( <[options clause|#optionsClause]> )?|| Defines a table. Example: {code:sql}(x string) OPTIONS (CARDINALITY 100){code} ---- |
h3. {anchor:foreignKey}_[foreign key|#usage_foreignKey]_ ::= - |[FOREIGN|#token_FOREIGN] [KEY|#token_KEY] <[column list|#columnList]> [REFERENCES|#token_REFERENCES] <[identifier|#id]> ( <[column list|#columnList]> )?|| |
... |
---- |
h3. {anchor:alterStatement}_[alter options|#usage_alterStatement]_ ::= - |[ALTER|#token_ALTER] ( [VIRTUAL|#token_VIRTUAL] \| [FOREIGN|#token_FOREIGN] )? ( [TABLE|#token_TABLE] \| [VIEW|#token_VIEW] \| [PROCEDURE|#token_PROCEDURE] ) <[identifier|#id]> ( <[alter options list|#alterOptionsList]> \| <[alter column options|#alterColumn]> )|| alters options of tables/procedure Example: {code:sql}ALTER FOREIGN TABLE foo OPTIONS (ADD cardinality 100){code} ---- h3. {anchor:alterOptionsList}_[alter options list|#usage_alterOptionsList]_ ::= - |[OPTIONS|#token_OPTIONS] <[lparen|#token_LPAREN]> ( <[add set option|#addSetOption]> \| <[drop option|#dropOption]> ) ( <[comma|#token_COMMA]> ( <[add set option|#addSetOption]> \| <[drop option|#dropOption]> ) )\* <[rparen|#token_RPAREN]>|| a list of alterations to options Example: {code:sql}OPTIONS (ADD updatable true){code} ---- h3. {anchor:dropOption}_[drop option|#usage_dropOption]_ ::= - |[DROP|#token_DROP] <[identifier|#id]>|| drop option Example: {code:sql}DROP updatable{code} ---- h3. {anchor:addSetOption}_[add set option|#usage_addSetOption]_ ::= - |( [ADD|#token_ADD] \| [SET|#token_SET] ) <[option pair|#optionPair]>|| add or set an option pair Example: {code:sql}ADD updatable true{code} ---- h3. {anchor:alterColumn}_[alter column options|#usage_alterColumn]_ ::= - |[ALTER|#token_ALTER] ( [COLUMN|#token_COLUMN] \| [PARAMETER|#token_PARAMETER] )? <[identifier|#id]> <[alter options list|#alterOptionsList]>|| alters a set of column options Example: {code:sql}ALTER COLUMN bar OPTIONS (ADD updatable true){code} ---- |
ALLOCATE | ARE | ARRAY | ASENSITIVE | ASYMETRIC | AUTHORIZATION | BINARY | CALLED |
CASCADED | CHARACTER | CHECK | CLOSE | COLLATE | COMMIT | CONNECT | CORRESPONDING |
CRITERIA | CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR | CYCLE | DATALINK |
DEALLOCATE | DEC | DEREF | DESCRIBE | DETERMINISTIC | DISCONNECT | DLNEWCOPY | DLPREVIOUSCOPY |
DLURLCOMPLETE | DLURLCOMPLETEONLY | DLURLCOMPLETEWRITE | DLURLPATH | DLURLPATHONLY | DLURLPATHWRITE | DLURLSCHEME | DLURLSERVER |
DLVALUE | DYNAMIC | ELEMENT | EXTERNAL | FREE | GET | GLOBAL | GRANT |
HAS | HOLD | IDENTITY | IMPORT | INDICATOR | INPUT | INSENSITIVE | INT |
INTERVAL | ISOLATION | LARGE | LOCALTIME | LOCALTIMESTAMP | MATCH | MEMBER | METHOD |
MODIFIES | MODULE | MULTISET | NATIONAL | NATURAL | NCHAR | NCLOB | NEW |
NONE | NUMERIC | OLD | OPEN | OUTPUT | OVERLAPS | PRECISION | PREPARE |
RANGE | READS | RECURSIVE | REFERENCING | RELEASE | REVOKE | ROLLBACK | ROLLUP |
SAVEPOINT | SCROLL | SEARCH | SENSITIVE | SESSION_USER | SPECIFIC | SPECIFICTYPE | SQL |
START | STATIC | SUBMULTILIST | SYMETRIC | SYSTEM | SYSTEM_USER | TIMEZONE_HOUR | TIMEZONE_MINUTE |
TRANSLATION | TREAT | VALUE | VARYING | WHENEVER | WINDOW | WITHIN | XMLBINARY |
XMLCAST | XMLDOCUMENT | XMLEXISTS | XMLITERATE | XMLTEXT | XMLVALIDATE |
A string literal value. Use '' to escape ' in the string.
Example:
'a string'
'it''s a string'
Allows non-reserved keywords to be parsed as identifiers
Example:
SELECT COUNT FROM ...
Partial or full name of a single entity.
Example:
tbl.col
"tbl"."col"
Creates a trigger action on the given target.
Example:
CREATE TRIGGER ON vw INSTEAD OF INSERT AS FOR EACH ROW BEGIN ATOMIC ... END
ALTER ( ( VIEW <identifier> AS <query expression> ) | ( PROCEDURE <identifier> AS <statement> ) | ( TRIGGER ON <identifier> INSTEAD OF ( INSERT | UPDATE | DELETE ) ( ( AS <for each row trigger action> ) | ENABLED | DISABLED ) ) ) |
Alter the given target.
Example:
ALTER VIEW vw AS SELECT col FROM tbl
Defines an action to perform on each row.
Example:
FOR EACH ROW BEGIN ATOMIC ... END
<alter> |
A statement that can be executed at runtime.
Example:
SELECT * FROM tbl
Creates a trigger action on the given target.
Example:
CREATE TRIGGER ON vw INSTEAD OF INSERT AS FOR EACH ROW BEGIN ATOMIC ... END
CREATE LOCAL TEMPORARY TABLE <identifier> <lparen> <temporary table element> ( <comma> <temporary table element> )* ( <comma> PRIMARY KEY <column list> )? <rparen> |
Creates a temporary table.
Example:
CREATE LOCAL TEMPORARY TABLE tmp (col integer)
<identifier> ( <data type> | SERIAL ) ( NOT NULL )? |
Defines a temporary table column.
Example:
col string NOT NULL
Raises an error with the given message.
Example:
ERROR 'something went wrong'
RAISE ( SQLWARNING )? <exception reference> |
Raises an error or warning with the given message.
Example:
RAISE SQLEXCEPTION 'something went wrong'
a reference to an exception
Example:
SQLEXCEPTION 'something went wrong' SQLSTATE '00X', 2
SQLEXCEPTION <common value expression> ( SQLSTATE <common value expression> ( <comma> <common value expression> )? )? ( CHAIN <exception reference> )? |
creates a sql exception or warning with the specified message, state, and code
Example:
SQLEXCEPTION 'something went wrong' SQLSTATE '00X', 2
( ( <identifier> <colon> )? ( <loop statement> | <while statement> | <compound statement> ) ) |
A procedure statement.
Example:
IF (x = 5) BEGIN ... END
( <assignment statement> | <data statement> | <raise error statement> | <raise statement> | <declare statement> | <branching statement> | <return statement> ) <semicolon> |
A procedure statement terminated by ;.
Example:
SELECT * FROM tbl;
A procedure statement block contained in BEGIN END.
Example:
BEGIN NOT ATOMIC ... END
( ( BREAK | CONTINUE ) ( <identifier> )? ) |
( LEAVE <identifier> ) |
A procedure branching control statement, which typically specifies a label to return control to.
Example:
BREAK x
RETURN ( <expression> )? |
A return statement.
Example:
RETURN 1
A procedure while statement that executes until its condition is false.
Example:
WHILE (var) BEGIN ... END
LOOP ON <lparen> <query expression> <rparen> AS <identifier> <statement> |
A procedure loop statement that executes over the given cursor.
Example:
LOOP ON (SELECT * FROM tbl) AS x BEGIN ... END
A procedure loop statement that executes over the given cursor.
Example:
LOOP ON (SELECT * FROM tbl) AS x BEGIN ... END
DECLARE ( <data type> | EXCEPTION ) <identifier> ( <eq> <assignment statement operand> )? |
A procedure declaration statement that creates a variable and optionally assigns a value.
Example:
DECLARE STRING x = 'a'
<identifier> <eq> ( <assignment statement operand> | ( <call statement> ( ( WITH | WITHOUT ) RETURN )? ) ) |
Assigns a variable a value in a procedure.
Example:
x = 'b'
A value or command that can be used in an assignment.
All assigments except for expression are deprecated. |
( <directly executable statement> | <dynamic data statement> ) ( ( WITH | WITHOUT ) RETURN )? |
A procedure statement that executes a SQL statement. An update statement can have its update count accessed via the ROWCOUNT variable.
Defines a procedure body on a Procedure metadata object.
Example:
CREATE VIRTUAL PROCEDURE BEGIN ... END
( EXECUTE | EXEC ) ( STRING | IMMEDIATE )? <expression> ( AS <typed element list> ( INTO <identifier> )? )? ( USING <set clause list> )? ( UPDATE ( <unsigned integer> | <star> ) )? |
A procedure statement that can execute arbitrary sql.
Example:
EXECUTE IMMEDIATE 'SELECT * FROM tbl' AS x STRING INTO #temp
<identifier> <eq> <expression> ( <comma> <identifier> <eq> <expression> )* |
A list of value assignments.
Example:
col1 = 'x', col2 = 'y' ...
<identifier> <data type> ( <comma> <identifier> <data type> )* |
A list of typed elements.
Example:
col1 string, col2 integer ...
<lbrace> ( <qmark> <eq> )? CALL <identifier> ( <lparen> ( <expression list> )? <rparen> )? <rbrace> ( <option clause> )? |
A callable statement defined using JDBC escape syntax.
Example:
{? = CALL proc}
( ( EXEC | EXECUTE | CALL ) <identifier> <lparen> ( <named parameter list> | ( <expression list> )? ) <rparen> ) ( <option clause> )? |
Executes the procedure with the given parameters.
Example:
CALL proc('a', 1)
( <identifier> <eq> ( <gt> )? <expression> ( <comma> <identifier> <eq> ( <gt> )? <expression> )* ) |
A list of named parameters.
Example:
param1 => 'x', param2 => 1
( INSERT | MERGE ) INTO <identifier> ( <column list> )? ( ( VALUES <lparen> <expression list> <rparen> ) | <query expression> ) ( <option clause> )? |
Inserts values into the given target.
Example:
INSERT INTO tbl (col1, col2) VALUES ('a', 1)
<expression> ( <comma> <expression> )* |
A list of expressions.
Example:
col1, 'a', ...
UPDATE <identifier> SET <set clause list> ( <where clause> )? ( <option clause> )? |
Update values in the given target.
Example:
UPDATE tbl SET (col1 = 'a') WHERE col2 = 1
DELETE FROM <identifier> ( <where clause> )? ( <option clause> )? |
Delete rows from the given target.
Example:
DELETE FROM tbl WHERE col2 = 1
( WITH <with list element> ( <comma> <with list element> )* )? <query expression body> |
A declarative query for data.
Example:
SELECT * FROM tbl WHERE col2 = 1
<identifier> ( <column list> )? AS <lparen> <query expression> <rparen> |
A query expression for use in the enclosing query.
Example:
X (Y, Z) AS (SELECT 1, 2)
<query term> ( ( UNION | EXCEPT ) ( ALL | DISTINCT )? <query term> )* ( <order by clause> )? ( <limit clause> )? ( <option clause> )? |
The body of a query expression, which can optionally be ordered and limited.
Example:
SELECT * FROM tbl ORDER BY col1 LIMIT 1
<query primary> ( INTERSECT ( ALL | DISTINCT )? <query primary> )* |
Used to establish INTERSECT precedence.
Example:
SELECT * FROM tbl
SELECT * FROM tbl1 INTERSECT SELECT * FROM tbl2
<query> |
( TABLE <identifier> ) |
( <lparen> <query expression body> <rparen> ) |
A declarative source of rows.
Example:
TABLE tbl
SELECT * FROM tbl1
<select clause> ( <into clause> )? ( <from clause> ( <where clause> )? ( <group by clause> )? ( <having clause> )? )? |
A SELECT query.
Example:
SELECT col1, max(col2) FROM tbl GROUP BY col1
Used to direct the query into a table.
This is deprecated. Use INSERT INTO with a query expression instead. |
Example:
INTO tbl
SELECT ( ALL | DISTINCT )? ( <star> | ( <select sublist> ( <comma> <select sublist> )* ) ) |
The columns returned by a query. Can optionally be distinct.
Example:
SELECT *
SELECT DISTINCT a, b, c
<all in group > |
An element in the select clause
Example:
tbl.*
tbl.col AS x
( <expression> ( ( AS )? <identifier> )? ) |
A select clause item that selects a single column.
This is slightly different than a derived column in that the AS keyword is optional. |
Example:
tbl.col AS x
( <expression> ( AS <identifier> )? ) |
An optionally named expression.
Example:
tbl.col AS x
A select sublist that can select all columns from the given group.
Example:
tbl.*
( XMLAGG | ARRAY_AGG | JSONARRAY_AGG ) <lparen> <expression> ( <order by clause> )? <rparen> |
An aggregate function that can optionally be ordered.
Example:
XMLAGG(col1) ORDER BY col2
ARRAY_AGG(col1)
TEXTAGG <lparen> ( FOR )? <derived column> ( <comma> <derived column> )* ( DELIMITER <character> )? ( QUOTE <character> )? ( HEADER )? ( ENCODING <identifier> )? ( <order by clause> )? <rparen> |
An aggregate function for creating separated value clobs.
Example:
TEXTAGG (col1 as t1, col2 as t2 DELIMITER ',' HEADER)
A standard aggregate function.
Example:
COUNT(*)
( ROW_NUMBER | RANK | DENSE_RANK ) <lparen> <rparen> |
An analytic aggregate function.
Example:
ROW_NUMBER()
FILTER <lparen> WHERE <boolean primary> <rparen> |
An aggregate filter clause applied prior to accumulating the value.
Example:
FILTER (WHERE col1='a')
FROM ( <table reference> ( <comma> <table reference> )* ) |
A query from clause containing a list of table references.
Example:
FROM a, b
FROM a right outer join b, c, d join e".</p>
( <escaped join> <joined table> <rbrace> ) |
An optionally escaped joined table.
Example:
a
a inner join b
<table primary> ( <cross join> | <qualified table> )* |
A table or join.
Example:
a
a inner join b
( ( CROSS | UNION ) JOIN <table primary> ) |
A cross join.
Example:
a CROSS JOIN b
An INNER or OUTER join.
Example:
a inner join b
( <text table> | <array table> | <xml table> | <object table> | <table name> | <table subquery> | ( <lparen> <joined table> <rparen> ) ) ( MAKEDEP | MAKENOTDEP )? |
A single source of rows.
Example:
a
XMLSERIALIZE <lparen> ( DOCUMENT | CONTENT )? <expression> ( AS ( STRING | VARCHAR | CLOB | VARBINARY | BLOB ) )? ( ENCODING <identifier> )? ( VERSION <string> )? ( ( INCLUDING | EXCLUDING ) XMLDECLARATION )? <rparen> |
Serializes an XML value.
Example:
XMLSERIALIZE(col1 AS CLOB)
ARRAYTABLE <lparen> <value expression primary> COLUMNS <typed element list> <rparen> ( AS )? <identifier> |
The ARRAYTABLE table function creates tabular results from arrays. It can be used as a nested table reference.
Example:
ARRAYTABLE (col1 COLUMNS x STRING) AS y
TEXTTABLE <lparen> <common value expression> ( SELECTOR <string> )? COLUMNS <text table column> ( <comma> <text table column> )* ( NO ROW DELIMITER )? ( DELIMITER <character> )? ( ( ESCAPE <character> ) | ( QUOTE <character> ) )? ( HEADER ( <unsigned integer> )? )? ( SKIP <unsigned integer> )? <rparen> ( AS )? <identifier> |
The TEXTTABLE table function creates tabular results from text. It can be used as a nested table reference.
Example:
TEXTTABLE (file COLUMNS x STRING) AS y
<identifier> <data type> ( WIDTH <unsigned integer> ( NO TRIM )? )? ( SELECTOR <string> <unsigned integer> )? |
A text table column.
Example:
x INTEGER WIDTH 6
XMLQUERY <lparen> ( <xml namespaces> <comma> )? <string> ( PASSING <derived column> ( <comma> <derived column> )* )? ( ( NULL | EMPTY ) ON EMPTY )? <rparen> |
Executes an XQuery to return an XML result.
Example:
XMLQUERY('<a>...</a>' PASSING doc)
OBJECTTABLE <lparen> ( LANGUAGE <string> )? <string> ( PASSING <derived column> ( <comma> <derived column> )* )? COLUMNS <object table column> ( <comma> <object table column> )* <rparen> ( AS )? <identifier> |
Returns table results by processing a script.
Example:
OBJECTTABLE('z' PASSING val AS z COLUMNS col OBJECT 'teiid_row') AS X
<identifier> <data type> <string> ( DEFAULT <expression> )? |
object table column.
Example:
y integer 'teiid_row_number'
XMLTABLE <lparen> ( <xml namespaces> <comma> )? <string> ( PASSING <derived column> ( <comma> <derived column> )* )? ( COLUMNS <xml table column> ( <comma> <xml table column> )* )? <rparen> ( AS )? <identifier> |
Returns table results by processing an XQuery.
Example:
XMLTABLE('/a/b' PASSING doc COLUMNS col XML PATH '.') AS X
<identifier> ( ( FOR ORDINALITY ) | ( <data type> ( DEFAULT <expression> )? ( PATH <string> )? ) ) |
XML table column.
Example:
y FOR ORDINALITY
An unsigned interger value.
Example:
12345
( TABLE | LATERAL )? <lparen> ( <query expression> | <call statement> ) <rparen> ( AS )? <identifier> |
A table defined by a subquery.
Example:
(SELECT * FROM tbl) AS x
( <identifier> ( ( AS )? <identifier> )? ) |
A table named in the FROM clause.
Example:
tbl AS x
Specifies a search condition
Example:
WHERE x = 'a'
A boolean expression.
<boolean term> ( OR <boolean term> )* |
An optionally ORed boolean expression.
<boolean factor> ( AND <boolean factor> )* |
An optional ANDed boolean factor.
( NOT )? <boolean primary> |
A boolean factor.
Example:
NOT x = 'a'
( <common value expression> ( <between predicate> | <match predicate> | <like regex predicate> | <in predicate> | <is null predicate> | <quantified comparison predicate> | <comparison predicate> )? ) |
A boolean predicate or simple expression.
Example:
col LIKE 'a%'
A comparison operator.
Example:
=
A value comparison.
Example:
= 'a'
<lparen> ( <query expression> | <call statement> ) <rparen> |
A subquery.
Example:
(SELECT * FROM tbl)
<comparison operator> ( ANY | SOME | ALL ) <subquery> |
A subquery comparison.
Example:
= ANY (SELECT col FROM tbl)
Matches based upon a pattern.
Example:
LIKE 'a_'
( NOT )? LIKE_REGEX <common value expression> |
A regular expression match.
Example:
LIKE_REGEX 'a.*b'
<string> |
A single character.
Example:
'a'
A comparison between two values.
Example:
BETWEEN 1 AND 5
A null test.
Example:
IS NOT NULL
( NOT )? IN ( <subquery> | ( <lparen> <common value expression> ( <comma> <common value expression> )* <rparen> ) ) |
A comparison with multiple values.
Example:
IN (1, 5)
A test if rows exist.
Example:
EXISTS (SELECT col FROM tbl)
Defines the grouping columns
Example:
GROUP BY col1, col2
Search condition applied after grouping.
Example:
HAVING max(col1) = 5
ORDER BY <sort specification> ( <comma> <sort specification> )* |
Specifices row ordering.
Example:
ORDER BY x, y DESC
Defines how to sort on a particular expression
Example:
col1 NULLS FIRST
A sort expression.
Example:
col1
<qmark> |
A literal integer or parameter reference to an integer.
Example:
?
( LIMIT <integer parameter> ( <comma> <integer parameter> )? ) |
( OFFSET <integer parameter> ( ROW | ROWS ) ( <fetch clause> )? ) |
Limits and/or offsets the resultant rows.
Example:
LIMIT 2
ANSI limit.
Example:
FETCH FIRST 1 ROWS ONLY
OPTION ( MAKEDEP <identifier> ( <comma> <identifier> )* | MAKENOTDEP <identifier> ( <comma> <identifier> )* | NOCACHE ( <identifier> ( <comma> <identifier> )* )? )* |
Specifies query options.
Example:
OPTION MAKEDEP tbl
A value.
Example:
col1
( <numeric value expression> ( <concat_op> <numeric value expression> )* ) |
Establishes the precedence of concat.
Example:
'a' || 'b'
( <term> ( <plus or minus> <term> )* ) |
Example:
1 + 2
The + or - operator.
Example:
+
( <value expression primary> ( <star or slash> <value expression primary> )* ) |
A numeric term
Example:
1 * 2
The * or / operator.
Example:
/
( <plus or minus> )? ( <unsigned numeric literal> | <unsigned value expression primary> ) |
A simple value expression.
Example:
+col1
<qmark> |
( <dollar> <unsigned integer> ) |
( <escaped function> <function> <rbrace> ) |
( ( <text aggreate function> | <standard aggregate function> | <ordered aggreate function> ) ( <filter clause> )? ( <window specification> )? ) |
( <analytic aggregate function> ( <filter clause> )? <window specification> ) |
( <function> ( <window specification> )? ) |
( ( <identifier> | <non-reserved identifier> ) ( <lsbrace> <common value expression> <rsbrace> )? ) |
<subquery> |
( <lparen> <expression> <rparen> ( <lsbrace> <common value expression> <rsbrace> )? ) |
An unsigned simple value expression.
Example:
col1
OVER <lparen> ( PARTITION BY <expression list> )? ( <order by clause> )? <rparen> |
The window specification for an analytical or windowed aggregate function.
Example:
OVER (PARTION BY col1)
CASE <expression> ( WHEN <expression> THEN <expression> )+ ( ELSE <expression> )? END |
If/then/else chain using a common search predicand.
Example:
CASE col1 WHEN 'a' THEN 1 ELSE 2
CASE ( WHEN <condition> THEN <expression> )+ ( ELSE <expression> )? END |
If/then/else chain using multiple search conditions.
Example:
CASE WHEN x = 'a' THEN 1 WHEN y = 'b' THEN 2
( SUBSTRING <lparen> <expression> ( ( FROM <expression> ( FOR <expression> )? ) | ( <comma> <expression list> ) ) <rparen> ) |
( TRIM <lparen> ( ( ( ( LEADING | TRAILING | BOTH ) ( <expression> )? ) | <expression> ) FROM )? <expression> <rparen> ) |
( ( TIMESTAMPADD | TIMESTAMPDIFF ) <lparen> <time interval> <comma> <expression> <comma> <expression> <rparen> ) |
( ( TRANSLATE | INSERT ) <lparen> ( <expression list> )? <rparen> ) |
( XMLPI <lparen> ( ( NAME )? <identifier> ) ( <comma> <expression> )? <rparen> ) |
( <identifier> <lparen> ( ALL | DISTINCT )? ( <expression list> )? ( <order by clause> )? <rparen> ( <filter clause> )? ) |
Calls a scalar function.
Example:
func('1', col1)
XMLPARSE <lparen> ( DOCUMENT | CONTENT ) <expression> ( WELLFORMED )? <rparen> |
Parses the given value as XML.
Example:
XMLPARSE(DOCUMENT doc WELLFORMED)
QUERYSTRING <lparen> <expression> ( <comma> <derived column> )* <rparen> |
Produces a URL query string from the given arguments.
Example:
QUERYSTRING(col1 AS opt, col2 AS val)
XMLELEMENT <lparen> ( ( NAME )? <identifier> ) ( <comma> <xml namespaces> )? ( <comma> <xml attributes> )? ( <comma> <expression> )* <rparen> |
Creates an XML element.
Example:
XMLELEMENT(NAME "root", child)
XMLATTRIBUTES <lparen> <derived column> ( <comma> <derived column> )* <rparen> |
Creates attributes for the containing element.
Example:
XMLATTRIBUTES(col1 AS attr1, col2 AS attr2)
Produces a JSON object containing name value pairs.
Example:
JSONOBJECT(col1 AS val1, col2 AS val2)
<derived column> ( <comma> <derived column> )* |
a list of name value pairs
Example:
col1 AS val1, col2 AS val2
XMLFOREST <lparen> ( <xml namespaces> <comma> )? <derived column list> <rparen> |
Produces an element for each derived column.
Example:
XMLFOREST(col1 AS ELEM1, col2 AS ELEM2)
XMLNAMESPACES <lparen> <xml namespace element> ( <comma> <xml namespace element> )* <rparen> |
Defines XML namespace URI/prefix combinations
Example:
XMLNAMESPACES('http://foo' AS foo)
( <string> AS <identifier> ) |
An xml namespace
Example:
NO DEFAULT
( STRING ( <lparen> <unsigned integer> <rparen> )? ) |
( VARCHAR ( <lparen> <unsigned integer> <rparen> )? ) |
( CHAR ( <lparen> <unsigned integer> <rparen> )? ) |
( BIGINTEGER ( <lparen> <unsigned integer> <rparen> )? ) |
( BIGDECIMAL ( <lparen> <unsigned integer> ( <comma> <unsigned integer> )? <rparen> )? ) |
( DECIMAL ( <lparen> <unsigned integer> ( <comma> <unsigned integer> )? <rparen> )? ) |
( BLOB ( <lparen> <unsigned integer> <rparen> )? ) |
( CLOB ( <lparen> <unsigned integer> <rparen> )? ) |
( VARBINARY ( <lparen> <unsigned integer> <rparen> )? ) |
A data type.
Example:
STRING
A time interval keyword.
Example:
SQL_TSI_HOUR
<string> |
( <escaped type> <string> <rbrace> ) |
An escaped or simple non numeric literal.
Example:
'a'
An unsigned numeric literal value.
Example:
1.234
( <create table> | <create procedure> | <option namespace> | <alter options> | <create trigger> ) ( <semicolon> )? |
A data definition statement.
Example:
CREATE FOREIGN TABLE X (Y STRING)
SET NAMESPACE <string> AS <identifier> |
A namespace used to shorten the full name of an option key.
Example:
SET NAMESPACE 'http://foo' AS foo
CREATE ( VIRTUAL | FOREIGN )? ( PROCEDURE | FUNCTION ) ( <identifier> <lparen> ( <procedure parameter> ( <comma> <procedure parameter> )* )? <rparen> ( RETURNS ( ( ( TABLE )? <lparen> <procedure result column> ( <comma> <procedure result column> )* <rparen> ) | <data type> ) )? ( <options clause> )? ( AS <statement> )? ) |
Defines a procedure or function invocation.
Example:
CREATE FOREIGN PROCEDURE proc (param STRING) RETURNS STRING
A procedure or function parameter
Example:
OUT x INTEGER
<identifier> <data type> ( NOT NULL )? ( <options clause> )? |
A procedure result column.
Example:
x INTEGER
CREATE ( FOREIGN TABLE | ( VIRTUAL )? VIEW ) <identifier> <create table body> ( AS <query expression> )? |
Defines a table or view.
Example:
CREATE VIEW vw AS SELECT 1
Defines a foreign temp table
Example:
CREATE FOREIGN TEMPORARY TABLE t (x string) ON z
( <lparen> <table element> ( <comma> <table element> )* ( <comma> ( CONSTRAINT <identifier> )? ( <primary key> | <other constraints> | <foreign key> ) ( <options clause> )? )* <rparen> )? ( <options clause> )? |
Defines a table.
Example:
(x string) OPTIONS (CARDINALITY 100)
FOREIGN KEY <column list> REFERENCES <identifier> ( <column list> )? |
Defines the foreign key referential constraint.
Example:
FOREIGN KEY (a, b) REFERENCES tbl (x, y)
Defines the primary key.
Example:
PRIMARY KEY (a, b)
( ( UNIQUE | ACCESSPATTERN ) <column list> ) |
( INDEX <lparen> <expression list> <rparen> ) |
Defines ACCESSPATTERN and UNIQUE constraints and INDEXes.
Example:
UNIQUE (a)
<lparen> <identifier> ( <comma> <identifier> )* <rparen> |
A list of column names.
Example:
(a, b)
<identifier> <data type> ( NOT NULL )? ( UNIQUE | ( INDEX | AUTO_INCREMENT )+ | ( PRIMARY KEY ) )? ( DEFAULT <string> )? ( <options clause> )? |
Defines a table column.
Example:
x INTEGER NOT NULL
OPTIONS <lparen> <option pair> ( <comma> <option pair> )* <rparen> |
A list of statement options.
Example:
OPTIONS ('x' 'y', 'a' 'b')
<identifier> ( <non numeric literal> | ( <plus or minus> )? <unsigned numeric literal> ) |
An option key/value pair.
Example:
'key' 'value'
ALTER ( VIRTUAL | FOREIGN )? ( TABLE | VIEW | PROCEDURE ) <identifier> ( <alter options list> | <alter column options> ) |
alters options of tables/procedure
Example:
ALTER FOREIGN TABLE foo OPTIONS (ADD cardinality 100)
OPTIONS <lparen> ( <add set option> | <drop option> ) ( <comma> ( <add set option> | <drop option> ) )* <rparen> |
a list of alterations to options
Example:
OPTIONS (ADD updatable true)
drop option
Example:
DROP updatable
( ADD | SET ) <option pair> |
add or set an option pair
Example:
ADD updatable true
ALTER ( COLUMN | PARAMETER )? <identifier> <alter options list> |
alters a set of column options
Example:
ALTER COLUMN bar OPTIONS (ADD updatable true)