By default, unquoted identifiers are case-insensitive and must begin with either a letter or the underscore (_) character. In addition, they can only contain a combination of standard
alphanumeric characters and symbols.

To support case-sensitive identifiers, as well as allowing identifiers to start with special characters and use extended characters (including blank spaces), identifiers can be enclosed in double quotes.

Note

Regardless of whether an identifier is unquoted or double-quoted, the maximum number of characters allowed is 256 (including blank spaces).

Identifiers can also be specified using string literals, session variables or bind variables. For details, see SQL Variables.

If an object is created using a double-quoted identifier, when referenced in a query or any other SQL statement, the identifier must be specified exactly as created, including the double
quotes. Failure to include the quotes may result in an Objectdoesnotexist error (or similar type of error).

Some third-party applications always use double quotes for identifiers in the SQL queries they generate, which may result in queries containing identifiers that cannot be found in Snowflake due to
differences in case.

To prevent this situation from occurring, Snowflake provides a session parameter, QUOTED_IDENTIFIERS_IGNORE_CASE, that ensures all alphabetical characters in identifiers created within the
session are stored in uppercase, regardless of whether the identifier is double-quoted. The default for the parameter is FALSE.

To modify the case-sensitive behavior for double-quoted identifiers, set the parameter to TRUE for the session. Thereafter, all alphabetical characters in identifiers are stored in uppercase.

With the default setting of FALSE, if an object is created using a double-quoted identifier with mixed case, Snowflake stores the identifier in mixed case.

If the parameter is then changed to TRUE, the identifier for the newly-created object is not retrievable/resolvable.

Tip

Due to the impact that changing the parameter can have on resolving identifiers, we highly recommend choosing an identifier resolution method early in your implementation of Snowflake and then
dictating the default behavior by setting the parameter at the account level accordingly, which can be done by any account administrator for your account. The parameter can always be overridden at the
session level, but we don’t encourage changing the parameter from the default, unless you have an explicit need to do so.

The following examples illustrate the behavior after changing the parameter from FALSE to TRUE:

-- Set the default behaviorALTERSESSIONSETQUOTED_IDENTIFIERS_IGNORE_CASE=false;-- Create a table with a double-quoted identifierCREATETABLE"One"(iint);-- stored as "One"-- Create a table with an unquoted identifierCREATETABLETWO(jint);-- stored as "TWO"-- These queries workSELECT*FROM"One";-- searches for "One"SELECT*FROMtwo;-- searched for "TWO"SELECT*FROM"TWO";-- searches for "TWO"-- These queries do not workSELECT*FROMOne;-- searches for "ONE"SELECT*FROM"Two";-- searches for "Two"-- Change to the all-uppercase behaviorALTERSESSIONSETQUOTED_IDENTIFIERS_IGNORE_CASE=true;-- Create another table with a double-quoted identifierCREATETABLE"Three"(kint);-- stored as "THREE"-- These queries workSELECT*FROM"Two";-- searches for "TWO"SELECT*FROMtwo;-- searched for "TWO"SELECT*FROM"TWO";-- searches for "TWO"SELECT*FROM"Three";-- searches for "THREE"SELECT*FROMthree;-- searches for "THREE"-- This query does not work now - "One" is not retrievableSELECT*FROM"One";-- searches for "ONE"

Additionally, if the identifiers for two tables differ only by case, one identifier might resolve to a different table after changing the parameter:

-- Set the default behaviorALTERSESSIONSETQUOTED_IDENTIFIERS_IGNORE_CASE=false;-- Create a table with a double-quoted identifierCREATETABLE"Tab"(iint);-- stored as "Tab"-- Create a table with an unquoted identifierCREATETABLETAB(jint);-- stored as "TAB"-- This query retrieves "Tab"SELECT*FROM"Tab"-- searches for "Tab"-- Change to the all-uppercase behaviorALTERSESSIONSETQUOTED_IDENTIFIERS_IGNORE_CASE=true;-- This query retrieves "TAB"SELECT*FROM"Tab"-- searches for "TAB"