Exam SnowPro Core All QuestionsBrowse all questions from this exam
Question 438

How does a Snowflake user execute an anonymous block of code?

    Correct Answer: B

    To execute an anonymous block of code in Snowflake, the statements that define the block also execute the block. This means you do not need to run a separate command to execute it; the BEGIN … END statement automatically handles the execution when defined.

Discussion
SnowProCertDec22Option: B

The BEGIN … END statement that defines the block also executes the block. (You don’t run a separate CALL command to execute the block.) https://docs.snowflake.com/en/developer-guide/snowflake-scripting/blocks.html#using-an-anonymous-block

e_l_i_a_sOption: B

If you don’t want to store the block in a stored procedure in the database, you can define and use an anonymous block. An anonymous block is a block that is not part of a stored procedure. You define the block as a separate, standalone SQL statement. The BEGIN statement that defines the block also executes the block. (You don’t run a separate CALL command to execute the block.) https://docs.snowflake.com/en/developer-guide/snowflake-scripting/blocks#using-an-anonymous-block

Rob__C

https://docs.snowflake.com/en/developer-guide/snowflake-scripting/blocks.html#using-an-anonymous-block