with ties主要用于top查询时,如果要查询价格最贵的10种物品,但是在表内还有两种产皮价格与第10种产品的价格一样,使用with ties 就可以显示排名并列的记录
select top(10) with ties * from product
with ties主要用于top查询时,如果要查询价格最贵的10种物品,但是在表内还有两种产皮价格与第10种产品的价格一样,使用with ties 就可以显示排名并列的记录
select top(10) with ties * from product