| 发表于:2007-03-07 14:50:276楼 得分:0 |
我现在是这样做的,我想可能这样比较好理解,就是想看看有没有好办法,例如设置一下之类的,让top的百分比取的是整数部分(全舍去),而不是全进位 select ... from table_a as a1 where a1.id not in (select top 80 percent a2.id from table_a as a2 where ... order by a1.a1 asc,a1.a2 desc) and ... order by a1.a1 desc,a1.a2 asc | | |
|