标签:
SELECT t2.* , t2.RowNumber FROM ( SELECT row_number() OVER ( PARTITION BY t.PartitionColumn ORDER BY t.ID DESC ) RowNumber , t.* FROM Table t ) t2 --WHERE t2.RowNumber = 1 ORDER BY t2.RowNumber ASC
标签:
原文地址:http://www.cnblogs.com/mtsl/p/4232470.html