How does a Snowflake user execute an anonymous block of code?
How does a Snowflake user execute an anonymous block of code?
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.
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
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
https://docs.snowflake.com/en/developer-guide/snowflake-scripting/blocks.html#using-an-anonymous-block