Snowflake Vs MS-SQL - Part 16 - Delete the Records

 


Delete the Records

You often have to delete records from a table based on some conditions from another table. 

MS-SQL Server 

A simple way is that you can write a SELECT query first and convert it into a DELETE query as below.





In Snowflake, the SELECT query works but the same syntax for DELETE does NOT work. we need to go with the USING clause. 




If you see the above query, you can use the sub-query as well.


For more details, you can refer to the following LINK.



Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 36 - SPLIT_TO_TABLE

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 33 - INITCAP