Posts

Showing posts from May, 2024

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

Image
  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 . Yogesh Shinde LinkedInProfile <<< Back   Next >>>

Snowflake Vs MS-SQL - Part 15 - Exclude

Image
Exclude Suppose one of your tables has many columns and when you are selecting the data you don't want all those columns and exclude a couple of columns then you have to specify the list of columns in the SELECT clause.   MS-SQL Server   You have to mention columns in the SELECT clause. In  Snowflake  we can achieve this by using  EXCLUDE .  You can provide the list of columns that you don't want in the select clause after EXCLUDE. If you are using JOIN to fetch records, in that case also you can use this EXCLUDE clause to remove columns from two or more tables. For more details, you can refer to the following  LINK . Yogesh Shinde LinkedInProfile <<< Back   Next >>>

Snowflake Vs MS-SQL - Part 14 - Clone Table

Image
Clone Table In day-to-day activity, you need to take back-up of the part of the table or the whole table. But you can see multiple versions of the table over the period on the server. This leads to extra space consumption as well .  MS-SQL Server   You can take the backup of the table as a DBA process or you  can use the INTO clause to create a table during run time. In  Snowflake  we can achieve this by using  CLONE .  The cloning feature provides a convenient way to quickly take a “snapshot” of any table, schema, or database. It does not copy the table or object physically rather the cloned object inherits any other metadata, such as comments or table clustering keys, that is current in the source object when the statement is executed. For more details, you can refer to the following  LINK  as well as  LINK . Yogesh Shinde LinkedInProfile <<< Back   Next >>>