TOP
Last updated
Last updated
Limits the rows returned in a query result set to a specified number of rows or percentage of rows. When you use TOP
with the ORDER BY
clause, the result set is limited to the first N number of ordered rows. Otherwise, TOP
returns the first N number of rows in an undefined order. Use this clause to specify the number of rows returned from a SELECT
statement. Or, use TOP
to specify the rows affected by an INSERT
, UPDATE
, MERGE
, or DELETE
statement. ()
To execute correctly the following samples it is required run the next CREATE TABLE
statement:
Since PERCENT
argument is not supported by Snowflake it is being removed from the TOP
clause, that's why the result of executing the query in Snowflake is not equivalent to SQL Server.
Since WITH TIES
argument is not supported by Snowflake it is being removed from the TOP
clause, that's why the result of executing the query in Snowflake is not equivalent to SQL Server.
Since the PERCENT
argument is not supported by Snowflake it is being removed from the TOP
clause and a warning is being added. Functional equivalence mismatches in the results could happen.
Since the WITH TIES
argument is not supported by Snowflake it is being removed from the TOP
clause and a warning is being added. Functional equivalence mismatches in the results could happen.
: THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE