Reputation: 3362
Sometimes when I select a column from a table in snowflake, I am required to use double quotes or it's case sensitive, but in other cases, it is not.
I am new to Snowflake.
Upvotes: 2
Views: 1710
Reputation: 41
Why would some columns be case-sensitive?
What characters in a column name would require me to list the whole column name in double quotes when I use it in a select statement?
We don't need to use double quotes when referencing them in the select statement when we use only uppercase with no special characters or whitespace, but that may differ from the original column name from the source systems.
Upvotes: 0
Reputation: 175566
Why would some columns be case sensitive?
When an identifier is double-quoted, it is stored and resolved exactly as entered, including case.
What characters in a column name would require me to list the whole column name in double quotes when I use it in a select statement?
Everything that is outside the [A-Za-z_0-9$]
or that needs to be case-sensitive requires quoting with "
Unquoted object identifiers:
Start with a letter (A-Z, a-z) or an underscore (“_”).
Contain only letters, underscores, decimal digits (0-9), and dollar signs (“$”).
Are case-insensitive.
Upvotes: 1