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

top问题
select   top   10   id   from   (   select   *   from   aa_tb   order   by   birthday   desc   )   as   a   where   id   not   in   (select   top   0   id   from   aa_tb)  

提示“除非同时指定了   TOP,否则   ORDER   BY   子句在视图、内嵌函数、派生表和子查询中无效。”

------解决方案--------------------
select top 10 id from aa_tb a where id not in (select top 0 id from aa_tb order by birthday desc ) order by birthday desc