Uploaded December 2023 | Updated September 2026, 1 hour ago
In this video tutorial, we will learn how to define local variables using let keyword in snowflake sql scripting while working with stored procedure as well as anonymous block. We will learn different way to define local variables and role of default as well as colon-equal operator to assign an expression to the local variable.
This comprehensive video explores all these possibilities and explain each concept by demonstrating executions using the Snowsight WebUI.
Upon completion of the "Work With Local Variables" chapter, you'll gain the knowledge to address the following questions:
1. In Snowflake scripting within a Stored Procedure, what is the process for declaring local variables?
2. How can a default value be set for a local variable in Snowflake scripting within a Stored Procedure?
3. What steps are involved in utilizing a built-in function as the default value for a local variable?
4. What are the various SQL data types that can be assigned to a local variable in Snowflake scripting within a Stored Procedure?
5. Can a query output be assigned to a local variable?
ππ How To Connect
β Instagram: instagram.com/learn_dataengineering
β Medium Blog: medium.com/@data-engineering-simplified
β Exclusive Snowflake Facebook Group: facebook.com/groups/627874916138090
ππ Stored Procedure SQL Scripts
medium.com/@data-engineering-simplified/f3a1bd5659e0
ππ Chapters
β₯ 00:00 Introduction
β₯ 00:49 Scope of the video
β₯ 01:34 Welcome Note
β₯ 04:40 3-Approaches To Declare Local Variable
β₯ 06:53 Case Sensitivity
β₯ 07:23 Duplicate Variable Name
β₯ 08:32 Default Value
β₯ 09:30 Default Value + Assignment Operator
β₯ 10:48 Function As Expression
β₯ 12:01 Select Query As Expression
β₯ 13:52 Different Data Type Declaration
β₯ 15:04 When To Use Local Variables
β₯ 15:50 Summary & What Next
β₯ 17:11 Thank You Note
ππ Snowflake Stored Procedure Playlist
youtube.com/playlist?list=PLba2xJ7yxHB5NksIHMPirkHhOoEG3-K09
β Ch-01 Snowflake Scripting For Stored Procedure Introduction youtu.be/-BhYp0X00P0
β Ch-02 Stored Procedures Are Anti-Pattern youtu.be/rBwknyABYMU
β Ch-03 Snowflake Scripting Block Structure youtu.be/yBaUbCFSMjM
β Ch-04 How To Declare Variable youtu.be/CyJ9LPFMhwc
β Ch-05 Declare & Define Local Variables youtu.be/pBDeMog56AQ
β Ch-06 How To Use Variables youtu.be/U2gbypinWZs
β Ch-07 Multiple Variable Assignment youtu.be/HlrcLrbPpD0
β Ch-08 Variable Visibility in nested block youtu.be/TvzTr8HPdtM
β Ch-09 Return Value/Expression/Table From Stored Proc youtu.be/Gl0x4yxz_Ok
β Ch-10 IF ELSEIF ELSE IF-END youtu.be/dmybW_lQuGA
β Ch-11 CASE/WHEN Conditional Logic youtu.be/oRzIqDvhyWU
β Ch-12 FOR Loop youtu.be/UzKb_TGtqpg
β Ch-13 WHILE Loop youtu.be/Q5UU5h7jdNU
β Ch-14 REPEAT Loop youtu.be/eNovcmu4Qk4
β Ch-15 Work With CURSOR Object youtu.be/MIy3k5SzqYk
β Ch-16 Param Binding & CURSOR Object youtu.be/MIy3k5SzqYk
β Ch-17 Work With RESULTSET Object youtu.be/MIy3k5SzqYk
β Ch-18 Exception Handling In Stored Procedure youtu.be/mP-PqZsl4b8
#storedprocedure
#snowflakecomputing
#snowflakedatawrehouse
#snowflake
#dataengineeringsimplifed
#DESimplified
#dataengineering
#clouddatawarehouse
Disclaimer: All snowflake-related learning materials and tutorial videos published in this channel are the personal opinions of the data engineering simplified team and they're neither authorized by nor associated with Snowflake, Inc.
In this video tutorial, we will learn how to define local variables using let keyword in snowflake sql scripting while working with stored procedure as well as anonymous block. We will learn different way to define local variables and role of default as well as colon-equal operator to assign an expression to the local variable.
This comprehensive video explores all these possibilities and explain each concept by demonstrating executions using the Snowsight WebUI.
Upon completion of the "Work With Local Variables" chapter, you'll gain the knowledge to address the following questions:
1. In Snowflake scripting within a Stored Procedure, what is the process for declaring local variables?
2. How can a default value be set for a local variable in Snowflake scripting within a Stored Procedure?
3. What steps are involved in utilizing a built-in function as the default value for a local variable?
4. What are the various SQL data types that can be assigned to a local variable in Snowflake scripting within a Stored Procedure?
5. Can a query output be assigned to a local variable?
ππ How To Connect
β Instagram: instagram.com/learn_dataengineering
β Medium Blog: medium.com/@data-engineering-simplified
β Exclusive Snowflake Facebook Group: facebook.com/groups/627874916138090
ππ Stored Procedure SQL Scripts
medium.com/@data-engineering-simplified/f3a1bd5659e0
ππ Chapters
β₯ 00:00 Introduction
β₯ 00:49 Scope of the video
β₯ 01:34 Welcome Note
β₯ 04:40 3-Approaches To Declare Local Variable
β₯ 06:53 Case Sensitivity
β₯ 07:23 Duplicate Variable Name
β₯ 08:32 Default Value
β₯ 09:30 Default Value + Assignment Operator
β₯ 10:48 Function As Expression
β₯ 12:01 Select Query As Expression
β₯ 13:52 Different Data Type Declaration
β₯ 15:04 When To Use Local Variables
β₯ 15:50 Summary & What Next
β₯ 17:11 Thank You Note
ππ Snowflake Stored Procedure Playlist
youtube.com/playlist?list=PLba2xJ7yxHB5NksIHMPirkHhOoEG3-K09
β Ch-01 Snowflake Scripting For Stored Procedure Introduction youtu.be/-BhYp0X00P0
β Ch-02 Stored Procedures Are Anti-Pattern youtu.be/rBwknyABYMU
β Ch-03 Snowflake Scripting Block Structure youtu.be/yBaUbCFSMjM
β Ch-04 How To Declare Variable youtu.be/CyJ9LPFMhwc
β Ch-05 Declare & Define Local Variables youtu.be/pBDeMog56AQ
β Ch-06 How To Use Variables youtu.be/U2gbypinWZs
β Ch-07 Multiple Variable Assignment youtu.be/HlrcLrbPpD0
β Ch-08 Variable Visibility in nested block youtu.be/TvzTr8HPdtM
β Ch-09 Return Value/Expression/Table From Stored Proc youtu.be/Gl0x4yxz_Ok
β Ch-10 IF ELSEIF ELSE IF-END youtu.be/dmybW_lQuGA
β Ch-11 CASE/WHEN Conditional Logic youtu.be/oRzIqDvhyWU
β Ch-12 FOR Loop youtu.be/UzKb_TGtqpg
β Ch-13 WHILE Loop youtu.be/Q5UU5h7jdNU
β Ch-14 REPEAT Loop youtu.be/eNovcmu4Qk4
β Ch-15 Work With CURSOR Object youtu.be/MIy3k5SzqYk
β Ch-16 Param Binding & CURSOR Object youtu.be/MIy3k5SzqYk
β Ch-17 Work With RESULTSET Object youtu.be/MIy3k5SzqYk
β Ch-18 Exception Handling In Stored Procedure youtu.be/mP-PqZsl4b8
#storedprocedure
#snowflakecomputing
#snowflakedatawrehouse
#snowflake
#dataengineeringsimplifed
#DESimplified
#dataengineering
#clouddatawarehouse
Disclaimer: All snowflake-related learning materials and tutorial videos published in this channel are the personal opinions of the data engineering simplified team and they're neither authorized by nor associated with Snowflake, Inc.










