
Answer-first summary for fast verification
Answer: The statements that define the block must also execute the block.
The correct answer is B because anonymous blocks in Snowflake are executed immediately when they are defined using the BEGIN...END statement structure. The community discussion with 100% consensus and upvoted comments from SnowProCertDec22 and e_l_i_a_s confirms this, citing Snowflake documentation that states 'The BEGIN statement that defines the block also executes the block. (You don't run a separate CALL command to execute the block.)' Option A is incorrect because CALL is used for stored procedures, not anonymous blocks. Option C is wrong as SUBMIT is not required for anonymous block execution. Option D is incorrect because anonymous blocks don't need to be saved to worksheets or executed via connectors - they execute immediately upon definition.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can a user execute an anonymous block of code in Snowflake?
A
The user must run the CALL command to execute the block.
B
The statements that define the block must also execute the block.
C
The SUBMIT command must run immediately after the block is defined
D
The block must be saved to a worksheet and executed using a connector.