SQL中的行号ROW_NUMBER()

select ROW_NUMBER() over (partition by [f1] order by [f2] ),* from [t1]

原文地址:https://www.cnblogs.com/sohobloo/p/2244577.html