all,any,some

select top 1000 
        * 
from    费用表 
where   费用ID<any ( select top 10 
                            ( 费用id ) 
                   from     费用表 
                   order by 费用ID asc  
)  
  
  
  
select top 1000 
        * 
from    费用表 
where   费用ID>all ( select top 10 
                            ( 费用id ) 
                   from     费用表 
                   order by 费用ID asc  
)  
  
  
  
  
  
select top 1000 
        * 
from    费用表 
where   费用ID<some ( select top 10 
                            ( 费用id ) 
                    from    费用表 
                    order by 费用ID asc )  
  
原文地址:https://www.cnblogs.com/qanholas/p/1874253.html