Snowflake Vs MS-SQL - Part 5 - Top n rows
Top n rows
MS-SQL Server
Suppose if you want to pull only limited data then you can use TOP N clause.
1. Top clause:
This is similar to MS-SQL Server.
For more details, you can refer the following LINK.
2. Limit clause:
You can mention this clause at the end of SQL Statement.
This LIMIT clause provides you more flexibility if you use OFFSET along with it.
But if you try to use both of these clauses in single SQL statement then it throws a compilation error(Duplicate LIMIT).
Yogesh Shinde
Comments
Post a Comment