Snowflake Vs MS-SQL - Part 52 - ORDER BY NULL

              


ORDER BY NULL

If your table column is NULLABLE and contains NULL values then when we sort the data, NULL values come at the top by default.

Actual Data:

Expected Data:


MS-SQL Server 

We can achieve customized sorting as below.



In Snowflake, we can use a similar approach as above. However, Snowflake has an additional clause in ORDER BY. 



For more details, you can refer to the following ORDER BY.




Yogesh Shinde

LinkedInProfile

<<< Back Next >>>

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