Amr Ali
Oct 22, 2023

Using RANK might kead to duplicate key exception in the merge statement if there are 2 rows with identical column values because rank will assign same id to them, while row_number will still order them with diffrent ids (eg id=1, id2) which will not lead to duplicate key exception.

Amr Ali
Amr Ali

Written by Amr Ali

Cloud Solutions Architect with an interest in Big Data Analytics, Machine Learning and AI.

No responses yet