如果表中存在 id name age 字段
   id 值为 1  2   3  4   5  6  7  8 9 10...... 30
我要查询前二十的后十位该怎么查询了?

解决方案 »

  1.   

    select *
    from tb
    order by id 
    limit 10,10
      

  2.   


    select * from (select rownum as rcnt,t.id,t.name,t.age from table t) tb where tb.rcnt between 11 and 20是这种吗
      

  3.   

    select *
    from 表
    order by id  
    limit 10,10
      

  4.   

    假设ID唯一 
    SELECT * FROM lsb ORDER BY id LIMIT 10,10
    就是 11 到20
      

  5.   

    搞错了,我用Oracle做了,楼上2位正解