select max(id) from (select top 200 from table)

解决方案 »

  1.   

    select max(id) from (select top 200 * from table)
    你以前的句子有问题
      

  2.   

    应该有个排序字段吧?
    select top 1 id
    from (select top 20 id from mytable order by somefield) t0
    order by somefield desc
      

  3.   

    select max(id) from (select top 200 * from table)AA
      

  4.   

    select id from tablename as A 
    where (select count(id) from tablename where id <= A.id ) = 200