COF-C02 · Question #221
Using variables in Snowflake is denoted by using which SQL character?
The correct answer is C. $. In Snowflake, session variables are defined with SET and referenced using the dollar sign ($) prefix-for example, SET myvar = 10; followed by SELECT $myvar. This applies both in SnowSQL scripting and within Snowflake's SQL worksheets. The @ symbol (A) is used in Snowflake to…
Question
Using variables in Snowflake is denoted by using which SQL character?
Options
- A@
- B&
- C$
- D
How the community answered
(54 responses)- A4% (2)
- B6% (3)
- C89% (48)
- D2% (1)
Explanation
In Snowflake, session variables are defined with SET and referenced using the dollar sign ($) prefix-for example, SET myvar = 10; followed by SELECT $myvar. This applies both in SnowSQL scripting and within Snowflake's SQL worksheets. The @ symbol (A) is used in Snowflake to reference stages (e.g., @my_stage). The & symbol (B) is not used as a variable prefix in Snowflake SQL. The # symbol (D) has no special variable-referencing role in Snowflake SQL.
Topics
Community Discussion
No community discussion yet for this question.