Snowflake Vs MS-SQL - Part 99 - Multi-Table Insert based on condition


Multi-Table Insert based on condition

Usually, we insert the data into a single table; however, if you want to insert records into different tables based on a value.

MS-SQL Server

We can achieve it as follows:



In Snowflake, we can use the same query as above; however, we can use INSERT FIRST as follows:





For more details, refer to the INSERT FIRST section.

Also, please refer to the earlier article regarding INSERT ALL - LINK.


  

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 70 - UNION By Name

Snowflake Vs MS-SQL - Part 68 - Multi Table Insert

Snowflake Key Concepts