日期:2014-05-19  浏览次数:20554 次

数据库问题
在一个表中只显示几行
如temp表
tempid   自增列
tempvalue   字段值
tempcount   字段个数
想在这个中选出个数在最多的前4列

------解决方案--------------------
select top 4 * from (select * from temp order by tempcount desc) a
------解决方案--------------------
select top 4 *
from temp
order by tempcount desc