Row Number
Window Function
Description
Returns the number of the current row within its partition, counting from 1.
Click here to navigate to the PostgreSQL docs page for this syntax.
The function Row_Number() is supported on Snowflake.
Grammar Syntax
This syntax is fully supported by Snowflake except that in PostgreSQL the order by clause is optional and in Snowflake this is not allowed. In case the order by clause is not present in the function the clause will be added.
Sample Source Patterns
This example will be used for the following code samples
Sample with Order By Clause
PostgreSQL
Snowflake
Sample without Order By Clause
PostgreSQL
Snowflake
Last updated