Skip to main content
Feedback

Snowflake reserved words support

One of the key features of Snowflake is its support for SQL queries, which enables you to manipulate data using a familiar syntax.

With any SQL-based platform, certain reserved words cannot be used as identifiers in queries. This can cause confusion or errors when working with Snowflake.

Snowflake reserved words

Snowflake has a large number of reserved words that are not available for use as identifiers in SQL queries. These words are reserved because they have a specific meaning within the SQL language and are used by Snowflake to parse and execute queries correctly.

The complete list of Snowflake reserved words is available in the Snowflake documentation. Some examples include:

  • ADD
  • ALL
  • AND
  • AS
  • BY
  • CREATE
  • DELETE
  • DESC
  • DROP
  • EXISTS
  • GROUP
  • INSERT
  • INTO
  • JOIN
  • LIKE
  • NOT
  • NULL
  • OR
  • SELECT
  • SET
  • TABLE
  • UNION
  • UPDATE
  • VALUES
  • WHERE

Handling reserved words in Snowflake

When working with Snowflake, avoid using reserved words as identifiers in SQL queries. If a reserved word is used as an identifier, it can cause errors or unexpected behavior in the query.

To avoid these issues, Data Integration provides a technique for handling reserved words:

Quoting identifiers

One way to handle reserved words in Snowflake is to enclose them in double quotes (""). This tells Snowflake to treat the enclosed text as an identifier, rather than a reserved word.

For example, if you wanted to create a table with the name select, you could enclose the name in double quotes like this:

CREATE TABLE "select" (id INT, name VARCHAR);

In the above SQL statement, the reserved word select is enclosed in double quotes. Snowflake treats the select as an identifier rather than a reserved word and performs the operation on the select table.

note

In case you fail to avoid using reserved words, Data Integration generates an error indicating that the reserved word cannot be used as an identifier.

On this Page