top 5是只取5行,
top 5 with ties是把和这5行有相同数据的行也取出来
table1
id name
1 100
2 200
3 300
4 300
5 400
select top 3 * from table1
结果:
1 100
2 200
3 300
select top 3 with ties * from table1
结果:
1 100
2 200
3 300
4 300