在"Select top 2 * from news order by count"进行筛选时,如果count值有重复时,则筛选结果将不是2条记录,这个问题该怎么解决?
在"Select top 2 * from news order by count"进行筛选时,如果count值有重复时,则筛选结果将不是2条记录,这个问题该怎么解决?
例如:
news 表的结构如下:
id title content count
假如现在表中有以下几个记录:
id title content count
1 新闻1 内容1 10
2 新闻2 内容2 8
3 新闻3 内容3 6
4 新闻4 内容4 9
5 新闻5 内容5 10
6 新闻6 内容6 10
则执行:Select top 2 * from news order by count
后执行结果如下:
id title content count
1 新闻1 内容1 10
5 新闻5 内容5 10
6 新闻6 内容6 10
4 新闻4 内容4 9
而我想得到的结果是:
id title content count
1 新闻1 内容1 10
4 新闻4 内容4 9
请大家帮我想想办法该怎么解决这个问题