SQL Guide#

Querona supports SQL that is compatible with Transact-SQL. This document describes all supported statements, functions, data types and stored procedures.

Transact-SQL Syntax Conventions#

The following table lists and describes conventions that are used in the syntax diagrams in the Transact-SQL Reference.


Used for


Transact-SQL keywords.


User-supplied parameters of Transact-SQL syntax.


Database names, table names, column names, index names, stored procedures, utilities, data type names, and text that must be typed exactly as shown.


Indicates the default value applied when the clause that contains the underlined value is omitted from the statement.

(vertical bar)

Separates syntax items enclosed in brackets or braces. You can use only one of the items.

[ ] (brackets)

Optional syntax items. Do not type the brackets.

{ } (braces)

Required syntax items. Do not type the braces.


Indicates the preceding item can be repeated n number of times. The occurrences are separated by commas.


Indicates the preceding item can be repeated n number of times. The occurrences are separated by blanks.


Transact-SQL statement terminator. Although the semicolon is not required for most statements, it will be required in a future Querona versions.

<label> ::=

The name for a block of syntax. This convention is used to group and label sections of lengthy syntax or a unit of syntax that can be used in more than one location within a statement. Each location in which the block of syntax can be used is indicated with the label enclosed in chevrons: <label>.

A set is a collection of expressions, for example <grouping set>; and a list is a collection of sets, for example <composite element list>.

Multipart Names#

Unless specified otherwise, all Transact-SQL references to the name of a database object can be a four-part name in the following form:

          | database_name.[schema_name].object_name
          | schema_name.object_name
          | object_name


Specifies a linked server name or remote server name.


Specifies the name of a database when the object resides in a local instance. When the object is in a linked server, database_name specifies an OLE DB catalog.


Specifies the name of the schema that contains the object if the object is in a database. When the object is in a linked server, schema_name specifies an OLE DB schema name.


Refers to the name of the object.

When referencing a specific object, you do not always have to specify the server, database, and schema for the Database Engine to identify the object. However, if the object cannot be found, an error is returned.


To avoid name resolution errors, we recommend specifying the schema name whenever you specify a schema-scoped object.

To omit intermediate nodes, use periods to indicate these positions. The following table shows the valid formats of object names:

Object reference format



Four-part name.

server. database..object

Schema name is omitted.


Database name is omitted.


Database and schema name are omitted.


Server name is omitted.


Server and schema name are omitted.


Server and database name are omitted.


Server, database, and schema name are omitted.